diff options
| author | Linus Jahn <lnj@kaidan.im> | 2022-12-26 21:35:16 +0100 |
|---|---|---|
| committer | Linus Jahn <lnj@kaidan.im> | 2022-12-26 22:00:07 +0100 |
| commit | 46995fd3fd7da4d1b035f71a1279c041b2871ffd (patch) | |
| tree | 788517dbefa88fc1680b05a97e84f0e1d7403815 /tests/qxmppattentionmanager | |
| parent | 71442ab927cd5c1c235528442fe3706f33e7ff6e (diff) | |
| download | qxmpp-46995fd3fd7da4d1b035f71a1279c041b2871ffd.tar.gz | |
Disable Qt keywords completely
Previously we had the policy that no qt keywords were allowed in headers
that may be included by users. However since there was no automatic test
verifying that in some places keywords were still used.
This now disables qt keywords completely, also in tests and examples. Qt
keywords are in general no good or really good idea as they even
conflict with the standard library (`emit` at least).
In some cases in the examples I just removed the slot tag if the
functions didn't need to be slots (anymore).
Closes #503.
Diffstat (limited to 'tests/qxmppattentionmanager')
| -rw-r--r-- | tests/qxmppattentionmanager/tst_qxmppattentionmanager.cpp | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/tests/qxmppattentionmanager/tst_qxmppattentionmanager.cpp b/tests/qxmppattentionmanager/tst_qxmppattentionmanager.cpp index dce277a2..81ff522f 100644 --- a/tests/qxmppattentionmanager/tst_qxmppattentionmanager.cpp +++ b/tests/qxmppattentionmanager/tst_qxmppattentionmanager.cpp @@ -15,16 +15,15 @@ class tst_QXmppAttentionManager : public QObject { Q_OBJECT -private slots: - void initTestCase(); +private: + Q_SLOT void initTestCase(); - void testDiscoFeatures(); - void testReceived_data(); - void testReceived(); - void testRateLimiting(); - void testSendRequest(); + Q_SLOT void testDiscoFeatures(); + Q_SLOT void testReceived_data(); + Q_SLOT void testReceived(); + Q_SLOT void testRateLimiting(); + Q_SLOT void testSendRequest(); -private: void setOwnJid(const QString &jid); void addToRoster(const QString &jid); @@ -100,7 +99,7 @@ void tst_QXmppAttentionManager::testReceived() limitedCalled = true; }); - emit client.messageReceived(msg); + Q_EMIT client.messageReceived(msg); QCOMPARE(signalCalled, accepted); QVERIFY(!limitedCalled); @@ -133,7 +132,7 @@ void tst_QXmppAttentionManager::testRateLimiting() msg.setAttentionRequested(true); for (int i = 0; i < count; i++) { - emit client.messageReceived(msg); + Q_EMIT client.messageReceived(msg); } QCOMPARE(signalCalled, allowed); @@ -144,7 +143,7 @@ void tst_QXmppAttentionManager::testRateLimiting() QCoreApplication::processEvents(); for (int i = 0; i < count; i++) { - emit client.messageReceived(msg); + Q_EMIT client.messageReceived(msg); } QCOMPARE(signalCalled, allowed * 2); |
