From: Janne Koschinski Date: Fri, 22 Dec 2017 02:46:12 +0000 (+0100) Subject: Fix compile error with Qt4 X-Git-Tag: travis-deploy-test~180 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=095d3006b60d64ef3a705ee204afe5e555ca8729;ds=sidebyside Fix compile error with Qt4 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. --- diff --git a/src/client/client.h b/src/client/client.h index 302689e8..225caab8 100644 --- a/src/client/client.h +++ b/src/client/client.h @@ -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 diff --git a/src/client/clientuserinputhandler.cpp b/src/client/clientuserinputhandler.cpp index bddd5c7c..8af827da 100644 --- a/src/client/clientuserinputhandler.cpp +++ b/src/client/clientuserinputhandler.cpp @@ -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