From 49713d8aca49a5fb8ca5a7e8fe04373904d525af Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Tue, 21 Jun 2016 20:19:14 +0200 Subject: [PATCH] Enforce Qt-specific keywords Reviewed by Albert Vaca --- CMakeLists.txt | 2 +- plugins/telepathy/telepathy-cm/connection.h | 4 ++-- plugins/telepathy/telepathy-cm/protocol.h | 4 ++-- plugins/telephony/sendsmsdialog.cpp | 2 +- tests/pluginloadtest.cpp | 2 +- tests/sendfiletest.cpp | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c8e768796..721ff6ac2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,7 +29,7 @@ include(FeatureSummary) include(KDEConnectMacros.cmake) -add_definitions(-DQT_NO_URL_CAST_FROM_STRING) +add_definitions(-DQT_NO_URL_CAST_FROM_STRING -DQT_NO_KEYWORDS) include(GenerateExportHeader) include_directories(${CMAKE_CURRENT_BINARY_DIR}) diff --git a/plugins/telepathy/telepathy-cm/connection.h b/plugins/telepathy/telepathy-cm/connection.h index 090374ba6..7819cd4df 100644 --- a/plugins/telepathy/telepathy-cm/connection.h +++ b/plugins/telepathy/telepathy-cm/connection.h @@ -42,11 +42,11 @@ public: uint ensureContact(const QString &identifier); -public slots: +public Q_SLOTS: bool receiveMessage(const QString &sender, const QString &message); void setContactList(const QStringList &identifiers); -signals: +Q_SIGNALS: void messageReceived(const QString &sender, const QString &message); private: diff --git a/plugins/telepathy/telepathy-cm/protocol.h b/plugins/telepathy/telepathy-cm/protocol.h index 25eb4d3e6..adde5d554 100644 --- a/plugins/telepathy/telepathy-cm/protocol.h +++ b/plugins/telepathy/telepathy-cm/protocol.h @@ -31,11 +31,11 @@ public: QString connectionManagerName() const; void setConnectionManagerName(const QString &newName); -public slots: +public Q_SLOTS: bool sendMessage(QString sender, QString message); void setContactList(QStringList list); -signals: +Q_SIGNALS: void contactsListChanged(QStringList); void messageReceived(QString sender, QString message); diff --git a/plugins/telephony/sendsmsdialog.cpp b/plugins/telephony/sendsmsdialog.cpp index f0be3235c..abf2fba0d 100644 --- a/plugins/telephony/sendsmsdialog.cpp +++ b/plugins/telephony/sendsmsdialog.cpp @@ -54,7 +54,7 @@ SendSmsDialog::SendSmsDialog(const QString& originalMessage, const QString& phon void SendSmsDialog::sendButtonClicked() { - emit sendSms(mPhoneNumber, mTextEdit->toPlainText()); + Q_EMIT sendSms(mPhoneNumber, mTextEdit->toPlainText()); close(); } diff --git a/tests/pluginloadtest.cpp b/tests/pluginloadtest.cpp index cc05fdf84..a663547fa 100644 --- a/tests/pluginloadtest.cpp +++ b/tests/pluginloadtest.cpp @@ -48,7 +48,7 @@ class PluginLoadTest : public QObject void testPlugins() { Device* d = nullptr; mDaemon->acquireDiscoveryMode("plugintest"); - foreach(Device* id, mDaemon->devicesList()) { + Q_FOREACH(Device* id, mDaemon->devicesList()) { if (id->isReachable()) { if (!id->isTrusted()) id->requestPair(); diff --git a/tests/sendfiletest.cpp b/tests/sendfiletest.cpp index f65e5bf7e..a5029cdfb 100644 --- a/tests/sendfiletest.cpp +++ b/tests/sendfiletest.cpp @@ -48,7 +48,7 @@ class TestSendFile : public QObject void testSend() { mDaemon->acquireDiscoveryMode("test"); Device* d = nullptr; - foreach(Device* id, mDaemon->devicesList()) { + Q_FOREACH(Device* id, mDaemon->devicesList()) { if (id->isReachable()) { if (!id->isTrusted()) id->requestPair();