aboutsummaryrefslogtreecommitdiff
path: root/src/server/QXmppIncomingClient.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/server/QXmppIncomingClient.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/server/QXmppIncomingClient.cpp')
-rw-r--r--src/server/QXmppIncomingClient.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/server/QXmppIncomingClient.cpp b/src/server/QXmppIncomingClient.cpp
index e86a309a..c8e1ada7 100644
--- a/src/server/QXmppIncomingClient.cpp
+++ b/src/server/QXmppIncomingClient.cpp
@@ -280,7 +280,7 @@ void QXmppIncomingClient::handleStanza(const QDomElement &nodeRecv)
// authentication succeeded
d->jid = QString("%1@%2").arg(d->saslServer->username(), d->domain);
info(QString("Authentication succeeded for '%1' from %2").arg(d->jid, d->origin()));
- emit updateCounter("incoming-client.auth.success");
+ Q_EMIT updateCounter("incoming-client.auth.success");
sendPacket(QXmppSaslSuccess());
handleStart();
} else {
@@ -308,7 +308,7 @@ void QXmppIncomingClient::handleStanza(const QDomElement &nodeRecv)
sendPacket(bindResult);
// bound
- emit connected();
+ Q_EMIT connected();
return;
} else if (QXmppSessionIq::isSessionIq(nodeRecv) && type == QLatin1String("set")) {
QXmppSessionIq sessionSet;
@@ -353,7 +353,7 @@ void QXmppIncomingClient::handleStanza(const QDomElement &nodeRecv)
}
// emit stanza for processing by server
- emit elementReceived(nodeFull);
+ Q_EMIT elementReceived(nodeFull);
}
}
}
@@ -369,7 +369,7 @@ void QXmppIncomingClient::onDigestReply()
if (reply->error() == QXmppPasswordReply::TemporaryError) {
warning(QString("Temporary authentication failure for '%1' from %2").arg(d->saslServer->username(), d->origin()));
- emit updateCounter("incoming-client.auth.temporary-auth-failure");
+ Q_EMIT updateCounter("incoming-client.auth.temporary-auth-failure");
sendPacket(QXmppSaslFailure("temporary-auth-failure"));
disconnectFromHost();
return;
@@ -381,7 +381,7 @@ void QXmppIncomingClient::onDigestReply()
QXmppSaslServer::Response result = d->saslServer->respond(reply->property("__sasl_raw").toByteArray(), challenge);
if (result != QXmppSaslServer::Challenge) {
warning(QString("Authentication failed for '%1' from %2").arg(d->saslServer->username(), d->origin()));
- emit updateCounter("incoming-client.auth.not-authorized");
+ Q_EMIT updateCounter("incoming-client.auth.not-authorized");
sendPacket(QXmppSaslFailure("not-authorized"));
disconnectFromHost();
return;
@@ -404,19 +404,19 @@ void QXmppIncomingClient::onPasswordReply()
case QXmppPasswordReply::NoError:
d->jid = jid;
info(QString("Authentication succeeded for '%1' from %2").arg(d->jid, d->origin()));
- emit updateCounter("incoming-client.auth.success");
+ Q_EMIT updateCounter("incoming-client.auth.success");
sendPacket(QXmppSaslSuccess());
handleStart();
break;
case QXmppPasswordReply::AuthorizationError:
warning(QString("Authentication failed for '%1' from %2").arg(jid, d->origin()));
- emit updateCounter("incoming-client.auth.not-authorized");
+ Q_EMIT updateCounter("incoming-client.auth.not-authorized");
sendPacket(QXmppSaslFailure("not-authorized"));
disconnectFromHost();
break;
case QXmppPasswordReply::TemporaryError:
warning(QString("Temporary authentication failure for '%1' from %2").arg(jid, d->origin()));
- emit updateCounter("incoming-client.auth.temporary-auth-failure");
+ Q_EMIT updateCounter("incoming-client.auth.temporary-auth-failure");
sendPacket(QXmppSaslFailure("temporary-auth-failure"));
disconnectFromHost();
break;
@@ -426,7 +426,7 @@ void QXmppIncomingClient::onPasswordReply()
void QXmppIncomingClient::onSocketDisconnected()
{
info(QString("Socket disconnected for '%1' from %2").arg(d->jid, d->origin()));
- emit disconnected();
+ Q_EMIT disconnected();
}
void QXmppIncomingClient::onTimeout()