From 8a3ad5431292789d10cc0f2cef0b52333e4088f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Blin?= <sebastien.blin@savoirfairelinux.com> Date: Mon, 29 Nov 2021 16:58:12 -0500 Subject: [PATCH] smartinfo: fix display on client-gnome (libwrap) signal from CallManager was not correctly caught and emitted to the client, so the SmartInfos weren't displayed. Change-Id: I365a401fc754a5895ff62531547b0ab8fb6cf087 --- src/private/smartInfoHub_p.h | 3 --- src/qtwrapper/callmanager_wrap.h | 6 +++--- src/smartinfohub.cpp | 16 +++++++--------- src/smartinfohub.h | 4 ++++ 4 files changed, 14 insertions(+), 15 deletions(-) diff --git a/src/private/smartInfoHub_p.h b/src/private/smartInfoHub_p.h index 8dd791c6..32dfc3eb 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 aa2b43fd..b1bb885c 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 54886436..6b1f51de 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 24ad7239..b11f413b 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(); -- GitLab