Fix compile error with Qt4
authorJanne Koschinski <janne@kuschku.de>
Fri, 22 Dec 2017 02:47:09 +0000 (03:47 +0100)
committerManuel Nickschas <sputnick@quassel-irc.org>
Wed, 28 Mar 2018 21:13:51 +0000 (23:13 +0200)
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
src/client/clientuserinputhandler.cpp

index a7e6c2c..c3172a7 100644 (file)
@@ -161,6 +161,10 @@ public:
 #endif
     static inline const QString &debugLog() { return instance()->_debugLogBuffer; }
 
+    void displayChannelList(NetworkId networkId) {
+        emit showChannelList(networkId);
+    }
+
 signals:
     void requestNetworkStates();
 
index 561eb3d..9d84ab8 100644 (file)
@@ -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());
 }