diff --git a/src/private/smartInfoHub_p.h b/src/private/smartInfoHub_p.h index 8dd791c6df0e28890614ce69f7e4896626545fe6..32dfc3eb5e486d02851cf033621d28c892110dd1 100644 --- a/src/private/smartInfoHub_p.h +++ b/src/private/smartInfoHub_p.h @@ -48,7 +48,4 @@ public: QMap<QString, QString> m_information; void setMapInfo(const MapStringString& info); - -public slots: - void slotSmartInfo(const MapStringString& info); }; diff --git a/src/qtwrapper/callmanager_wrap.h b/src/qtwrapper/callmanager_wrap.h index aa2b43fdfd2473bc2689a444775670b85fe8ae37..b1bb885c4a43a191842d98c22139b2b113903e60 100644 --- a/src/qtwrapper/callmanager_wrap.h +++ b/src/qtwrapper/callmanager_wrap.h @@ -225,8 +225,8 @@ public: }), exportable_callback<CallSignal::SmartInfo>( [this](const std::map<std::string, std::string>& info) { - LOG_DRING_SIGNAL("smartInfo", ""); - Q_EMIT smartInfo(convertMap(info)); + LOG_DRING_SIGNAL("SmartInfo", ""); + Q_EMIT SmartInfo(convertMap(info)); }), exportable_callback<CallSignal::RemoteRecordingChanged>( [this](const std::string& callId, const std::string& contactId, bool state) { @@ -599,7 +599,7 @@ Q_SIGNALS: // SIGNALS void audioMuted(const QString& callId, bool state); void videoMuted(const QString& callId, bool state); void peerHold(const QString& callId, bool state); - void smartInfo(const MapStringString& info); + void SmartInfo(const MapStringString& info); void remoteRecordingChanged(const QString& callId, const QString& peerNumber, bool remoteRecordingState); diff --git a/src/smartinfohub.cpp b/src/smartinfohub.cpp index 54886436eed69e8742fe0c1b684368316b28c1c1..6b1f51deb38a22a43e4cca77609c93b864b1cb0e 100644 --- a/src/smartinfohub.cpp +++ b/src/smartinfohub.cpp @@ -18,7 +18,6 @@ #include "smartinfohub.h" #include "private/smartInfoHub_p.h" -#include "typedefs.h" #include <dbus/videomanager.h> #include <dbus/callmanager.h> @@ -28,9 +27,9 @@ SmartInfoHub::SmartInfoHub() { d_ptr = new SmartInfoHubPrivate; connect(&CallManager::instance(), - SIGNAL(SmartInfo(MapStringString)), - d_ptr, - SLOT(slotSmartInfo(MapStringString)), + &CallManagerInterface::SmartInfo, + this, + &SmartInfoHub::slotSmartInfo, Qt::QueuedConnection); } @@ -64,13 +63,12 @@ SmartInfoHub::setRefreshTime(uint32_t timeMS) // Retrieve information from the map and implement all the variables void -SmartInfoHubPrivate::slotSmartInfo(const MapStringString& map) +SmartInfoHub::slotSmartInfo(const MapStringString& map) { - for (int i = 0; i < map.size(); i++) { - SmartInfoHubPrivate::m_information[map.keys().at(i)] = map[map.keys().at(i)]; - } + for (int i = 0; i < map.size(); i++) + d_ptr->m_information[map.keys().at(i)] = map[map.keys().at(i)]; - emit SmartInfoHub::instance().changed(); + emit changed(); } // Getter diff --git a/src/smartinfohub.h b/src/smartinfohub.h index 24ad7239fdc2cc2c788dec202ccd5997f660bfae..b11f413b289e70b2da4ef66b6c9b1572a7ba627c 100644 --- a/src/smartinfohub.h +++ b/src/smartinfohub.h @@ -19,6 +19,7 @@ #pragma once #include <QObject> +#include "typedefs.h" class SmartInfoHubPrivate; @@ -52,6 +53,9 @@ Q_SIGNALS: /// Emitted when informations have changed void changed(); +private Q_SLOTS: + void slotSmartInfo(const MapStringString& info); + private: // use to initialise the connection between the Qsignal and the lambda function SmartInfoHub();