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/qxmppregistrationmanager/tst_qxmppregistrationmanager.cpp | |
| 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/qxmppregistrationmanager/tst_qxmppregistrationmanager.cpp')
| -rw-r--r-- | tests/qxmppregistrationmanager/tst_qxmppregistrationmanager.cpp | 55 |
1 files changed, 27 insertions, 28 deletions
diff --git a/tests/qxmppregistrationmanager/tst_qxmppregistrationmanager.cpp b/tests/qxmppregistrationmanager/tst_qxmppregistrationmanager.cpp index 0cd2b005..80dabe65 100644 --- a/tests/qxmppregistrationmanager/tst_qxmppregistrationmanager.cpp +++ b/tests/qxmppregistrationmanager/tst_qxmppregistrationmanager.cpp @@ -13,34 +13,33 @@ class tst_QXmppRegistrationManager : public QObject { Q_OBJECT -private slots: - void initTestCase(); - - void testDiscoFeatures(); - - void testChangePassword_data(); - void testChangePassword(); - void testDeleteAccount(); - void testRequestRegistrationForm_data(); - void testRequestRegistrationForm(); - void testRegisterOnConnectGetSet(); - void testServiceDiscovery(); - void testSendCachedRegistrationForm_data(); - void testSendCachedRegistrationForm(); - void testStreamFeaturesCheck_data(); - void testStreamFeaturesCheck(); - void testRegistrationResult_data(); - void testRegistrationResult(); - void testChangePasswordResult_data(); - void testChangePasswordResult(); - void testDeleteAccountResult_data(); - void testDeleteAccountResult(); - void testRegistrationFormReceived(); - - void sendStreamFeaturesToManager(bool registrationEnabled = true); - void setManagerConfig(const QString &username, const QString &server = QStringLiteral("example.org"), const QString &password = {}); - private: + Q_SLOT void initTestCase(); + + Q_SLOT void testDiscoFeatures(); + + Q_SLOT void testChangePassword_data(); + Q_SLOT void testChangePassword(); + Q_SLOT void testDeleteAccount(); + Q_SLOT void testRequestRegistrationForm_data(); + Q_SLOT void testRequestRegistrationForm(); + Q_SLOT void testRegisterOnConnectGetSet(); + Q_SLOT void testServiceDiscovery(); + Q_SLOT void testSendCachedRegistrationForm_data(); + Q_SLOT void testSendCachedRegistrationForm(); + Q_SLOT void testStreamFeaturesCheck_data(); + Q_SLOT void testStreamFeaturesCheck(); + Q_SLOT void testRegistrationResult_data(); + Q_SLOT void testRegistrationResult(); + Q_SLOT void testChangePasswordResult_data(); + Q_SLOT void testChangePasswordResult(); + Q_SLOT void testDeleteAccountResult_data(); + Q_SLOT void testDeleteAccountResult(); + Q_SLOT void testRegistrationFormReceived(); + + Q_SLOT void sendStreamFeaturesToManager(bool registrationEnabled = true); + Q_SLOT void setManagerConfig(const QString &username, const QString &server = QStringLiteral("example.org"), const QString &password = {}); + QXmppClient client; QXmppLogger logger; QXmppRegistrationManager *manager; @@ -206,7 +205,7 @@ void tst_QXmppRegistrationManager::testServiceDiscovery() delete context; // on disconnect, supportedByServer needs to be reset - emit client.disconnected(); + Q_EMIT client.disconnected(); QVERIFY(!manager->supportedByServer()); } |
