From 4415bf52fbb3952d373d5259e4bdd7a6d5559fd3 Mon Sep 17 00:00:00 2001 From: Ronan Abhamon Date: Mon, 26 Jun 2017 11:59:33 +0200 Subject: [PATCH] fix(Notifier): do not use std string params --- src/components/core/CoreHandlers.cpp | 5 ++++- src/components/notifier/Notifier.cpp | 6 +++--- src/components/notifier/Notifier.hpp | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/components/core/CoreHandlers.cpp b/src/components/core/CoreHandlers.cpp index d866417a7..a175ac4da 100644 --- a/src/components/core/CoreHandlers.cpp +++ b/src/components/core/CoreHandlers.cpp @@ -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) + ); } diff --git a/src/components/notifier/Notifier.cpp b/src/components/notifier/Notifier.cpp index 8b04f474d..d4e683dcc 100644 --- a/src/components/notifier/Notifier.cpp +++ b/src/components/notifier/Notifier.cpp @@ -261,14 +261,14 @@ void Notifier::notifyReceivedCall (const shared_ptr &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); diff --git a/src/components/notifier/Notifier.hpp b/src/components/notifier/Notifier.hpp index 5b2134d9c..2ac309180 100644 --- a/src/components/notifier/Notifier.hpp +++ b/src/components/notifier/Notifier.hpp @@ -49,7 +49,7 @@ public: void notifyReceivedMessage (const std::shared_ptr &message); void notifyReceivedFileMessage (const std::shared_ptr &message); void notifyReceivedCall (const std::shared_ptr &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);