fix(Notifier): do not use std string params

This commit is contained in:
Ronan Abhamon 2017-06-26 11:59:33 +02:00
parent 9853b6939e
commit 4415bf52fb
3 changed files with 8 additions and 5 deletions

View file

@ -236,5 +236,8 @@ void CoreHandlers::onVersionUpdateCheckResultReceived (
const string &url
) {
if (result == linphone::VersionUpdateCheckResultNewVersionAvailable)
App::getInstance()->getNotifier()->notifyNewVersionAvailable(version, url);
App::getInstance()->getNotifier()->notifyNewVersionAvailable(
::Utils::coreStringToAppString(version),
::Utils::coreStringToAppString(url)
);
}

View file

@ -261,14 +261,14 @@ void Notifier::notifyReceivedCall (const shared_ptr<linphone::Call> &call) {
showNotification(notification, NOTIFICATION_TIMEOUT_RECEIVED_CALL);
}
void Notifier::notifyNewVersionAvailable (const string &version, const string &url) {
void Notifier::notifyNewVersionAvailable (const QString &version, const QString &url) {
QObject *notification = createNotification(Notifier::NewVersionAvailable);
if (!notification)
return;
QVariantMap map;
map["message"] = tr("newVersionAvailable").arg(::Utils::coreStringToAppString(version));
map["url"] = ::Utils::coreStringToAppString(url);
map["message"] = tr("newVersionAvailable").arg(version);
map["url"] = url;
::setProperty(*notification, NOTIFICATION_PROPERTY_DATA, map);
showNotification(notification, NOTIFICATION_TIMEOUT_NEW_VERSION_AVAILABLE);

View file

@ -49,7 +49,7 @@ public:
void notifyReceivedMessage (const std::shared_ptr<linphone::ChatMessage> &message);
void notifyReceivedFileMessage (const std::shared_ptr<linphone::ChatMessage> &message);
void notifyReceivedCall (const std::shared_ptr<linphone::Call> &call);
void notifyNewVersionAvailable (const std::string &version, const std::string &url);
void notifyNewVersionAvailable (const QString &version, const QString &url);
public slots:
void deleteNotification (QVariant notification);