From 93605206bc40e06446efabc71e155a3216dbb0b9 Mon Sep 17 00:00:00 2001 From: Janne Koschinski Date: Fri, 22 Dec 2017 03:47:09 +0100 Subject: [PATCH] Fix compile error with Qt4 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit In Qt4, signals are protected, therefore we can’t emit a signal on Client from the ClientUserInputHandler. Therefore we wrap the signal emitter with a function on the Client. Closes GH-320. --- src/client/client.h | 4 ++++ src/client/clientuserinputhandler.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/client/client.h b/src/client/client.h index a7e6c2c2..c3172a7f 100644 --- a/src/client/client.h +++ b/src/client/client.h @@ -161,6 +161,10 @@ public: #endif static inline const QString &debugLog() { return instance()->_debugLogBuffer; } + void displayChannelList(NetworkId networkId) { + emit showChannelList(networkId); + } + signals: void requestNetworkStates(); diff --git a/src/client/clientuserinputhandler.cpp b/src/client/clientuserinputhandler.cpp index 561eb3d8..9d84ab81 100644 --- a/src/client/clientuserinputhandler.cpp +++ b/src/client/clientuserinputhandler.cpp @@ -142,7 +142,7 @@ void ClientUserInputHandler::handleIgnore(const BufferInfo &bufferInfo, const QS void ClientUserInputHandler::handleList(const BufferInfo &bufferInfo, const QString &text) { - emit Client::instance()->showChannelList(bufferInfo.networkId()); + Client::instance()->displayChannelList(bufferInfo.networkId()); } -- 2.20.1