Skip to content
Snippets Groups Projects
Commit 8a3ad543 authored by Sébastien Blin's avatar Sébastien Blin Committed by Amin Bandali
Browse files

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
parent 4d0c9c13
No related merge requests found
......@@ -48,7 +48,4 @@ public:
QMap<QString, QString> m_information;
void setMapInfo(const MapStringString& info);
public slots:
void slotSmartInfo(const MapStringString& info);
};
......@@ -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);
......
......@@ -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
......
......@@ -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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment