aboutsummaryrefslogtreecommitdiff
path: root/src/client/QXmppClient.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/QXmppClient.cpp
parent71442ab927cd5c1c235528442fe3706f33e7ff6e (diff)
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/QXmppClient.cpp')
-rw-r--r--src/client/QXmppClient.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/client/QXmppClient.cpp b/src/client/QXmppClient.cpp
index f69bc29b..174c4219 100644
--- a/src/client/QXmppClient.cpp
+++ b/src/client/QXmppClient.cpp
@@ -863,7 +863,7 @@ bool QXmppClient::injectMessage(QXmppMessage &&message)
auto handled = MessagePipeline::process(this, d->extensions, std::move(message));
if (!handled) {
// no extension handled the message
- emit messageReceived(message);
+ Q_EMIT messageReceived(message);
}
return handled;
}
@@ -890,7 +890,7 @@ void QXmppClient::_q_reconnect()
void QXmppClient::_q_socketStateChanged(QAbstractSocket::SocketState socketState)
{
Q_UNUSED(socketState);
- emit stateChanged(state());
+ Q_EMIT stateChanged(state());
}
/// At connection establishment, send initial presence.
@@ -902,8 +902,8 @@ void QXmppClient::_q_streamConnected()
d->isActive = true;
// notify managers
- emit connected();
- emit stateChanged(QXmppClient::ConnectedState);
+ Q_EMIT connected();
+ Q_EMIT stateChanged(QXmppClient::ConnectedState);
// send initial presence
if (d->stream->isAuthenticated()) {
@@ -914,8 +914,8 @@ void QXmppClient::_q_streamConnected()
void QXmppClient::_q_streamDisconnected()
{
// notify managers
- emit disconnected();
- emit stateChanged(QXmppClient::DisconnectedState);
+ Q_EMIT disconnected();
+ Q_EMIT stateChanged(QXmppClient::DisconnectedState);
}
void QXmppClient::_q_streamError(QXmppClient::Error err)
@@ -936,7 +936,7 @@ void QXmppClient::_q_streamError(QXmppClient::Error err)
}
// notify managers
- emit error(err);
+ Q_EMIT error(err);
}
QXmppLogger *QXmppClient::logger() const
@@ -968,6 +968,6 @@ void QXmppClient::setLogger(QXmppLogger *logger)
d->logger, &QXmppLogger::updateCounter);
}
- emit loggerChanged(d->logger);
+ Q_EMIT loggerChanged(d->logger);
}
}