aboutsummaryrefslogtreecommitdiff
path: root/src/client/QXmppRegistrationManager.cpp
diff options
context:
space:
mode:
authorLinus Jahn <lnj@kaidan.im>2022-12-26 21:35:16 +0100
committerLinus Jahn <lnj@kaidan.im>2022-12-26 22:00:07 +0100
commit46995fd3fd7da4d1b035f71a1279c041b2871ffd (patch)
tree788517dbefa88fc1680b05a97e84f0e1d7403815 /src/client/QXmppRegistrationManager.cpp
parent71442ab927cd5c1c235528442fe3706f33e7ff6e (diff)
downloadqxmpp-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 'src/client/QXmppRegistrationManager.cpp')
-rw-r--r--src/client/QXmppRegistrationManager.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/client/QXmppRegistrationManager.cpp b/src/client/QXmppRegistrationManager.cpp
index 71c2f39e..b4ae7510 100644
--- a/src/client/QXmppRegistrationManager.cpp
+++ b/src/client/QXmppRegistrationManager.cpp
@@ -183,9 +183,9 @@ bool QXmppRegistrationManager::handleStanza(const QDomElement &stanza)
if (features.registerMode() == QXmppStreamFeatures::Disabled) {
warning(QStringLiteral("Could not request the registration form, because the server does not advertise the register stream feature."));
client()->disconnectFromServer();
- emit registrationFailed({ QXmppStanza::Error::Cancel,
- QXmppStanza::Error::FeatureNotImplemented,
- QStringLiteral("The server does not advertise the register stream feature.") });
+ Q_EMIT registrationFailed({ QXmppStanza::Error::Cancel,
+ QXmppStanza::Error::FeatureNotImplemented,
+ QStringLiteral("The server does not advertise the register stream feature.") });
return true;
}
@@ -210,11 +210,11 @@ bool QXmppRegistrationManager::handleStanza(const QDomElement &stanza)
switch (iq.type()) {
case QXmppIq::Result:
info(QStringLiteral("Successfully registered with the service."));
- emit registrationSucceeded();
+ Q_EMIT registrationSucceeded();
break;
case QXmppIq::Error:
warning(QStringLiteral("Registering with the service failed: ").append(iq.error().text()));
- emit registrationFailed(iq.error());
+ Q_EMIT registrationFailed(iq.error());
break;
default:
break; // should never occur
@@ -230,11 +230,11 @@ bool QXmppRegistrationManager::handleStanza(const QDomElement &stanza)
case QXmppIq::Result:
info(QStringLiteral("Changed password successfully."));
client()->configuration().setPassword(d->newPassword);
- emit passwordChanged(d->newPassword);
+ Q_EMIT passwordChanged(d->newPassword);
break;
case QXmppIq::Error:
warning(QStringLiteral("Failed to change password: ").append(iq.error().text()));
- emit passwordChangeFailed(iq.error());
+ Q_EMIT passwordChangeFailed(iq.error());
break;
default:
break; // should never occur
@@ -250,12 +250,12 @@ bool QXmppRegistrationManager::handleStanza(const QDomElement &stanza)
switch (iq.type()) {
case QXmppIq::Result:
info(QStringLiteral("Account deleted successfully."));
- emit accountDeleted();
+ Q_EMIT accountDeleted();
client()->disconnectFromServer();
break;
case QXmppIq::Error:
warning(QStringLiteral("Failed to delete account: ").append(iq.error().text()));
- emit accountDeletionFailed(iq.error());
+ Q_EMIT accountDeletionFailed(iq.error());
break;
default:
break; // should never occur
@@ -267,7 +267,7 @@ bool QXmppRegistrationManager::handleStanza(const QDomElement &stanza)
QXmppRegisterIq iq;
iq.parse(stanza);
- emit registrationFormReceived(iq);
+ Q_EMIT registrationFormReceived(iq);
}
}
return false;
@@ -302,6 +302,6 @@ void QXmppRegistrationManager::setSupportedByServer(bool registrationSupported)
{
if (d->supportedByServer != registrationSupported) {
d->supportedByServer = registrationSupported;
- emit supportedByServerChanged();
+ Q_EMIT supportedByServerChanged();
}
}