From 46995fd3fd7da4d1b035f71a1279c041b2871ffd Mon Sep 17 00:00:00 2001 From: Linus Jahn Date: Mon, 26 Dec 2022 21:35:16 +0100 Subject: 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. --- src/server/QXmppIncomingServer.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/server/QXmppIncomingServer.cpp') diff --git a/src/server/QXmppIncomingServer.cpp b/src/server/QXmppIncomingServer.cpp index 962c087d..648868bf 100644 --- a/src/server/QXmppIncomingServer.cpp +++ b/src/server/QXmppIncomingServer.cpp @@ -143,12 +143,12 @@ void QXmppIncomingServer::handleStanza(const QDomElement &stanza) stream->connectToHost(domain); } else if (request.command() == QXmppDialback::Verify) { debug(QString("Received a dialback verify from '%1' on %2").arg(domain, d->origin())); - emit dialbackRequestReceived(request); + Q_EMIT dialbackRequestReceived(request); } } else if (d->authenticated.contains(QXmppUtils::jidToDomain(stanza.attribute("from")))) { // relay stanza if the remote party is authenticated - emit elementReceived(stanza); + Q_EMIT elementReceived(stanza); } else { warning(QString("Received an element from unverified domain '%1' on %2").arg(QXmppUtils::jidToDomain(stanza.attribute("from")), d->origin())); disconnectFromHost(); @@ -194,7 +194,7 @@ void QXmppIncomingServer::slotDialbackResponseReceived(const QXmppDialback &dial const bool wasConnected = !d->authenticated.isEmpty(); d->authenticated.insert(dialback.from()); if (!wasConnected) { - emit connected(); + Q_EMIT connected(); } } else { warning(QString("Failed to verify incoming domain '%1' on %2").arg(dialback.from(), d->origin())); @@ -209,5 +209,5 @@ void QXmppIncomingServer::slotDialbackResponseReceived(const QXmppDialback &dial void QXmppIncomingServer::slotSocketDisconnected() { info(QString("Socket disconnected from %1").arg(d->origin())); - emit disconnected(); + Q_EMIT disconnected(); } -- cgit v1.2.3