Commit 4415bf52 authored by Ronan Abhamon's avatar Ronan Abhamon

fix(Notifier): do not use std string params

parent 9853b693
...@@ -236,5 +236,8 @@ void CoreHandlers::onVersionUpdateCheckResultReceived ( ...@@ -236,5 +236,8 @@ void CoreHandlers::onVersionUpdateCheckResultReceived (
const string &url const string &url
) { ) {
if (result == linphone::VersionUpdateCheckResultNewVersionAvailable) if (result == linphone::VersionUpdateCheckResultNewVersionAvailable)
App::getInstance()->getNotifier()->notifyNewVersionAvailable(version, url); App::getInstance()->getNotifier()->notifyNewVersionAvailable(
::Utils::coreStringToAppString(version),
::Utils::coreStringToAppString(url)
);
} }
...@@ -261,14 +261,14 @@ void Notifier::notifyReceivedCall (const shared_ptr<linphone::Call> &call) { ...@@ -261,14 +261,14 @@ void Notifier::notifyReceivedCall (const shared_ptr<linphone::Call> &call) {
showNotification(notification, NOTIFICATION_TIMEOUT_RECEIVED_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); QObject *notification = createNotification(Notifier::NewVersionAvailable);
if (!notification) if (!notification)
return; return;
QVariantMap map; QVariantMap map;
map["message"] = tr("newVersionAvailable").arg(::Utils::coreStringToAppString(version)); map["message"] = tr("newVersionAvailable").arg(version);
map["url"] = ::Utils::coreStringToAppString(url); map["url"] = url;
::setProperty(*notification, NOTIFICATION_PROPERTY_DATA, map); ::setProperty(*notification, NOTIFICATION_PROPERTY_DATA, map);
showNotification(notification, NOTIFICATION_TIMEOUT_NEW_VERSION_AVAILABLE); showNotification(notification, NOTIFICATION_TIMEOUT_NEW_VERSION_AVAILABLE);
......
...@@ -49,7 +49,7 @@ public: ...@@ -49,7 +49,7 @@ public:
void notifyReceivedMessage (const std::shared_ptr<linphone::ChatMessage> &message); void notifyReceivedMessage (const std::shared_ptr<linphone::ChatMessage> &message);
void notifyReceivedFileMessage (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 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: public slots:
void deleteNotification (QVariant notification); void deleteNotification (QVariant notification);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment