From 19f2cbb9566eddac697c673eed63c0e946f330a6 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Wed, 17 Feb 2016 13:27:56 +0100 Subject: Use slots/signals instead of Q_SLOTS/Q_SIGNALS for clang-format compatibility --- common/genericresource.cpp | 4 ++-- common/genericresource.h | 2 +- common/listener.h | 6 +++--- common/pipeline.h | 2 +- common/resource.h | 2 +- common/resourceaccess.h | 8 ++++---- formattest.cpp | 4 ++-- sinksh/repl/replStates.h | 6 +++--- tests/clientapitest.cpp | 2 +- tests/databasepopulationandfacadequerybenchmark.cpp | 2 +- tests/domainadaptortest.cpp | 2 +- tests/dummyresourcebenchmark.cpp | 2 +- tests/dummyresourcetest.cpp | 2 +- tests/dummyresourcewritebenchmark.cpp | 2 +- tests/genericfacadetest.cpp | 2 +- tests/genericresourcebenchmark.cpp | 2 +- tests/genericresourcetest.cpp | 2 +- tests/indextest.cpp | 2 +- tests/inspectiontest.cpp | 2 +- tests/maildirresourcetest.cpp | 2 +- tests/maildirsyncbenchmark.cpp | 2 +- tests/mailquerybenchmark.cpp | 2 +- tests/messagequeuetest.cpp | 2 +- tests/modelinteractivitytest.cpp | 2 +- tests/pipelinebenchmark.cpp | 2 +- tests/pipelinetest.cpp | 2 +- tests/querytest.cpp | 2 +- tests/resourcecommunicationtest.cpp | 2 +- tests/storagebenchmark.cpp | 2 +- tests/storagetest.cpp | 2 +- tests/testimplementations.h | 2 +- 31 files changed, 40 insertions(+), 40 deletions(-) diff --git a/common/genericresource.cpp b/common/genericresource.cpp index 2688df0..74a8cfb 100644 --- a/common/genericresource.cpp +++ b/common/genericresource.cpp @@ -70,10 +70,10 @@ public: return (lastReplayedRevision >= topRevision); } -Q_SIGNALS: +signals: void changesReplayed(); -public Q_SLOTS: +public slots: void revisionChanged() { auto mainStoreTransaction = mStorage.createTransaction(Storage::ReadOnly); diff --git a/common/genericresource.h b/common/genericresource.h index ceb6b61..b9bb994 100644 --- a/common/genericresource.h +++ b/common/genericresource.h @@ -56,7 +56,7 @@ public: static void removeFromDisk(const QByteArray &instanceIdentifier); static qint64 diskUsage(const QByteArray &instanceIdentifier); -private Q_SLOTS: +private slots: void updateLowerBoundRevision(); protected: diff --git a/common/listener.h b/common/listener.h index 5bcc93e..49ded1a 100644 --- a/common/listener.h +++ b/common/listener.h @@ -65,13 +65,13 @@ public: Listener(const QByteArray &resourceName, QObject *parent = 0); ~Listener(); -Q_SIGNALS: +signals: void noClients(); -public Q_SLOTS: +public slots: void closeAllConnections(); -private Q_SLOTS: +private slots: void acceptConnection(); void clientDropped(); void checkConnections(); diff --git a/common/pipeline.h b/common/pipeline.h index 096771f..0f989e4 100644 --- a/common/pipeline.h +++ b/common/pipeline.h @@ -69,7 +69,7 @@ public: */ qint64 cleanedUpRevision(); -Q_SIGNALS: +signals: void revisionUpdated(qint64); private: diff --git a/common/resource.h b/common/resource.h index ab30cb9..d0100f6 100644 --- a/common/resource.h +++ b/common/resource.h @@ -60,7 +60,7 @@ public: */ virtual void removeDataFromDisk(); -Q_SIGNALS: +signals: void revisionUpdated(qint64); void notify(Notification); diff --git a/common/resourceaccess.h b/common/resourceaccess.h index 3b03210..ce7e174 100644 --- a/common/resourceaccess.h +++ b/common/resourceaccess.h @@ -53,12 +53,12 @@ public: virtual KAsync::Job sendRevisionReplayedCommand(qint64 revision) {return KAsync::null(); }; virtual KAsync::Job sendInspectionCommand(const QByteArray &inspectionId, const QByteArray &domainType, const QByteArray &entityId, const QByteArray &property, const QVariant &expecedValue) {return KAsync::null(); }; -Q_SIGNALS: +signals: void ready(bool isReady); void revisionChanged(qint64 revision); void notification(Notification revision); -public Q_SLOTS: +public slots: virtual void open() = 0; virtual void close() = 0; }; @@ -88,11 +88,11 @@ public: */ static KAsync::Job > connectToServer(const QByteArray &identifier); -public Q_SLOTS: +public slots: void open() Q_DECL_OVERRIDE; void close() Q_DECL_OVERRIDE; -private Q_SLOTS: +private slots: //TODO: move these to the Private class void disconnected(); void connectionError(QLocalSocket::LocalSocketError error); diff --git a/formattest.cpp b/formattest.cpp index f12fd59..14eb550 100644 --- a/formattest.cpp +++ b/formattest.cpp @@ -116,10 +116,10 @@ public: return (lastReplayedRevision >= topRevision); } -Q_SIGNALS: +signals: void changesReplayed(); -public Q_SLOTS: +public slots: void revisionChanged() { auto mainStoreTransaction = mStorage.createTransaction(Storage::ReadOnly); diff --git a/sinksh/repl/replStates.h b/sinksh/repl/replStates.h index a0d3f90..0b14943 100644 --- a/sinksh/repl/replStates.h +++ b/sinksh/repl/replStates.h @@ -30,7 +30,7 @@ class ReadState : public QState public: ReadState(QState *parent = 0); -Q_SIGNALS: +signals: void command(const QString &command); void exitRequested(); @@ -57,7 +57,7 @@ class EvalState : public QState public: EvalState(QState *parent = 0); -Q_SIGNALS: +signals: void completed(); void continueInput(); void output(const QString &output); @@ -78,7 +78,7 @@ class PrintState : public QState public: PrintState(QState *parent = 0); -Q_SIGNALS: +signals: void completed(); protected: diff --git a/tests/clientapitest.cpp b/tests/clientapitest.cpp index 0e21ca6..879ffc4 100644 --- a/tests/clientapitest.cpp +++ b/tests/clientapitest.cpp @@ -79,7 +79,7 @@ public: class ClientAPITest : public QObject { Q_OBJECT -private Q_SLOTS: +private slots: void initTestCase() { diff --git a/tests/databasepopulationandfacadequerybenchmark.cpp b/tests/databasepopulationandfacadequerybenchmark.cpp index ad3682e..16537c0 100644 --- a/tests/databasepopulationandfacadequerybenchmark.cpp +++ b/tests/databasepopulationandfacadequerybenchmark.cpp @@ -156,7 +156,7 @@ class DatabasePopulationAndFacadeQueryBenchmark : public QObject // std::system("top -p \"$PPID\" -b -n 1"); } -private Q_SLOTS: +private slots: void init() { diff --git a/tests/domainadaptortest.cpp b/tests/domainadaptortest.cpp index f523173..5939a31 100644 --- a/tests/domainadaptortest.cpp +++ b/tests/domainadaptortest.cpp @@ -28,7 +28,7 @@ public: class DomainAdaptorTest : public QObject { Q_OBJECT -private Q_SLOTS: +private slots: void initTestCase() { } diff --git a/tests/dummyresourcebenchmark.cpp b/tests/dummyresourcebenchmark.cpp index 9afc775..77b87fb 100644 --- a/tests/dummyresourcebenchmark.cpp +++ b/tests/dummyresourcebenchmark.cpp @@ -30,7 +30,7 @@ class DummyResourceBenchmark : public QObject Q_OBJECT private: int num; -private Q_SLOTS: +private slots: void initTestCase() { Sink::Log::setDebugOutputLevel(Sink::Log::Warning); diff --git a/tests/dummyresourcetest.cpp b/tests/dummyresourcetest.cpp index 7d9ad24..8b5a8fa 100644 --- a/tests/dummyresourcetest.cpp +++ b/tests/dummyresourcetest.cpp @@ -23,7 +23,7 @@ class DummyResourceTest : public QObject QTime time; -private Q_SLOTS: +private slots: void initTestCase() { Sink::Log::setDebugOutputLevel(Sink::Log::Trace); diff --git a/tests/dummyresourcewritebenchmark.cpp b/tests/dummyresourcewritebenchmark.cpp index 6c05a1e..539d189 100644 --- a/tests/dummyresourcewritebenchmark.cpp +++ b/tests/dummyresourcewritebenchmark.cpp @@ -172,7 +172,7 @@ class DummyResourceWriteBenchmark : public QObject } -private Q_SLOTS: +private slots: void initTestCase() { Sink::Log::setDebugOutputLevel(Sink::Log::Warning); diff --git a/tests/genericfacadetest.cpp b/tests/genericfacadetest.cpp index 63e93f8..397bf6a 100644 --- a/tests/genericfacadetest.cpp +++ b/tests/genericfacadetest.cpp @@ -22,7 +22,7 @@ class GenericFacadeTest : public QObject { Q_OBJECT -private Q_SLOTS: +private slots: void init() { diff --git a/tests/genericresourcebenchmark.cpp b/tests/genericresourcebenchmark.cpp index 7f0d3a2..b3af6a6 100644 --- a/tests/genericresourcebenchmark.cpp +++ b/tests/genericresourcebenchmark.cpp @@ -85,7 +85,7 @@ public: class GenericResourceBenchmark : public QObject { Q_OBJECT -private Q_SLOTS: +private slots: void init() { diff --git a/tests/genericresourcetest.cpp b/tests/genericresourcetest.cpp index 76c604e..a04c634 100644 --- a/tests/genericresourcetest.cpp +++ b/tests/genericresourcetest.cpp @@ -22,7 +22,7 @@ class GenericResourceTest : public QObject { Q_OBJECT -private Q_SLOTS: +private slots: void init() { diff --git a/tests/indextest.cpp b/tests/indextest.cpp index a435e97..ce1fde7 100644 --- a/tests/indextest.cpp +++ b/tests/indextest.cpp @@ -13,7 +13,7 @@ class IndexTest : public QObject { Q_OBJECT -private Q_SLOTS: +private slots: void initTestCase() { Sink::Storage store("./testindex", "org.kde.dummy.testindex", Sink::Storage::ReadWrite); diff --git a/tests/inspectiontest.cpp b/tests/inspectiontest.cpp index 79e5863..cdf62e6 100644 --- a/tests/inspectiontest.cpp +++ b/tests/inspectiontest.cpp @@ -16,7 +16,7 @@ class InspectionTest : public QObject { Q_OBJECT -private Q_SLOTS: +private slots: void initTestCase() { Sink::Log::setDebugOutputLevel(Sink::Log::Trace); diff --git a/tests/maildirresourcetest.cpp b/tests/maildirresourcetest.cpp index eefe1e9..d5f7f95 100644 --- a/tests/maildirresourcetest.cpp +++ b/tests/maildirresourcetest.cpp @@ -53,7 +53,7 @@ class MaildirResourceTest : public QObject QTemporaryDir tempDir; QString targetPath; -private Q_SLOTS: +private slots: void initTestCase() { targetPath = tempDir.path() + "/maildir1/"; diff --git a/tests/maildirsyncbenchmark.cpp b/tests/maildirsyncbenchmark.cpp index 4f23524..7904a82 100644 --- a/tests/maildirsyncbenchmark.cpp +++ b/tests/maildirsyncbenchmark.cpp @@ -59,7 +59,7 @@ class MaildirSyncBenchmark : public QObject QString targetPath; HAWD::State mHawdState; -private Q_SLOTS: +private slots: void initTestCase() { targetPath = tempDir.path() + "/maildir1"; diff --git a/tests/mailquerybenchmark.cpp b/tests/mailquerybenchmark.cpp index 4efd5cf..ea919ac 100644 --- a/tests/mailquerybenchmark.cpp +++ b/tests/mailquerybenchmark.cpp @@ -148,7 +148,7 @@ class MailQueryBenchmark : public QObject // std::system("top -p \"$PPID\" -b -n 1"); } -private Q_SLOTS: +private slots: void init() { diff --git a/tests/messagequeuetest.cpp b/tests/messagequeuetest.cpp index 454ace2..06a4ae6 100644 --- a/tests/messagequeuetest.cpp +++ b/tests/messagequeuetest.cpp @@ -14,7 +14,7 @@ class MessageQueueTest : public QObject { Q_OBJECT -private Q_SLOTS: +private slots: void initTestCase() { Sink::Log::setDebugOutputLevel(Sink::Log::Trace); diff --git a/tests/modelinteractivitytest.cpp b/tests/modelinteractivitytest.cpp index 3f6e697..ad23e0f 100644 --- a/tests/modelinteractivitytest.cpp +++ b/tests/modelinteractivitytest.cpp @@ -43,7 +43,7 @@ public: class ModelinteractivityTest : public QObject { Q_OBJECT -private Q_SLOTS: +private slots: void initTestCase() { Sink::Log::setDebugOutputLevel(Sink::Log::Warning); diff --git a/tests/pipelinebenchmark.cpp b/tests/pipelinebenchmark.cpp index c0c5cb1..5743830 100644 --- a/tests/pipelinebenchmark.cpp +++ b/tests/pipelinebenchmark.cpp @@ -126,7 +126,7 @@ class PipelineBenchmark : public QObject } -private Q_SLOTS: +private slots: void init() { diff --git a/tests/pipelinetest.cpp b/tests/pipelinetest.cpp index d6073dc..92b7554 100644 --- a/tests/pipelinetest.cpp +++ b/tests/pipelinetest.cpp @@ -179,7 +179,7 @@ public: class PipelineTest : public QObject { Q_OBJECT -private Q_SLOTS: +private slots: void initTestCase() { Sink::Log::setDebugOutputLevel(Sink::Log::Trace); diff --git a/tests/querytest.cpp b/tests/querytest.cpp index f147c58..3bb0427 100644 --- a/tests/querytest.cpp +++ b/tests/querytest.cpp @@ -18,7 +18,7 @@ class QueryTest : public QObject { Q_OBJECT -private Q_SLOTS: +private slots: void initTestCase() { Sink::Log::setDebugOutputLevel(Sink::Log::Trace); diff --git a/tests/resourcecommunicationtest.cpp b/tests/resourcecommunicationtest.cpp index f9ea3de..db8703e 100644 --- a/tests/resourcecommunicationtest.cpp +++ b/tests/resourcecommunicationtest.cpp @@ -11,7 +11,7 @@ class ResourceCommunicationTest : public QObject { Q_OBJECT -private Q_SLOTS: +private slots: void testConnect() { const QByteArray resourceIdentifier("test"); diff --git a/tests/storagebenchmark.cpp b/tests/storagebenchmark.cpp index 09cc336..8498df9 100644 --- a/tests/storagebenchmark.cpp +++ b/tests/storagebenchmark.cpp @@ -51,7 +51,7 @@ private: QString filePath; const int count = 50000; -private Q_SLOTS: +private slots: void initTestCase() { Sink::Log::setDebugOutputLevel(Sink::Log::Warning); diff --git a/tests/storagetest.cpp b/tests/storagetest.cpp index b0db1ac..6341808 100644 --- a/tests/storagetest.cpp +++ b/tests/storagetest.cpp @@ -57,7 +57,7 @@ private: return success && keyMatch; } -private Q_SLOTS: +private slots: void initTestCase() { testDataPath = "./testdb"; diff --git a/tests/testimplementations.h b/tests/testimplementations.h index 234e99d..adfdab3 100644 --- a/tests/testimplementations.h +++ b/tests/testimplementations.h @@ -64,7 +64,7 @@ public: KAsync::Job sendCommand(int commandId, flatbuffers::FlatBufferBuilder &fbb) Q_DECL_OVERRIDE { return KAsync::null(); } KAsync::Job synchronizeResource(bool remoteSync, bool localSync) Q_DECL_OVERRIDE { return KAsync::null(); } -public Q_SLOTS: +public slots: void open() Q_DECL_OVERRIDE {} void close() Q_DECL_OVERRIDE {} }; -- cgit v1.2.3