Fix compile error with Qt4
authorJanne Koschinski <janne@kuschku.de>
Fri, 22 Dec 2017 02:46:12 +0000 (03:46 +0100)
committerManuel Nickschas <sputnick@quassel-irc.org>
Tue, 27 Feb 2018 23:06:59 +0000 (00:06 +0100)
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-318.

src/client/client.h
src/client/clientuserinputhandler.cpp

index 302689e..225caab 100644 (file)
@@ -152,6 +152,10 @@ public:
     static void changePassword(const QString &oldPassword, const QString &newPassword);
     static void kickClient(int peerId);
 
+    void displayIgnoreList(QString ignoreRule) {
+        emit showIgnoreList(ignoreRule);
+    }
+
 #if QT_VERSION < 0x050000
     static void logMessage(QtMsgType type, const char *msg);
 #else
index bddd5c7..8af827d 100644 (file)
@@ -121,7 +121,7 @@ void ClientUserInputHandler::handleQuery(const BufferInfo &bufferInfo, const QSt
 void ClientUserInputHandler::handleIgnore(const BufferInfo &bufferInfo, const QString &text)
 {
     if (text.isEmpty()) {
-        emit Client::instance()->showIgnoreList("");
+        emit Client::instance()->displayIgnoreList("");
         return;
     }
     // If rule contains no ! or @, we assume it is just a nickname, and turn it into an ignore rule for that nick