From 095d3006b60d64ef3a705ee204afe5e555ca8729 Mon Sep 17 00:00:00 2001 From: Janne Koschinski Date: Fri, 22 Dec 2017 03:46:12 +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-318. --- 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 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 -- 2.20.1