diff options
| author | JBB <jbb.prv@gmx.de> | 2020-01-20 00:19:38 +0100 |
|---|---|---|
| committer | LNJ <lnj@kaidan.im> | 2020-01-20 00:19:38 +0100 |
| commit | 8557bc3a605e5d2b1a7dae5999501b19c1c99b58 (patch) | |
| tree | f17fefa61a26e01c99884c7d3e458b8ea70b181b /examples/example_6_rpcClient/rpcClient.cpp | |
| parent | cccb7675e0eb9d411c736d1ff3f189fb75ef33dd (diff) | |
| download | qxmpp-8557bc3a605e5d2b1a7dae5999501b19c1c99b58.tar.gz | |
Port majority of old-style connects (#237)
This provides more type safety and is future-proof.
Diffstat (limited to 'examples/example_6_rpcClient/rpcClient.cpp')
| -rw-r--r-- | examples/example_6_rpcClient/rpcClient.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/examples/example_6_rpcClient/rpcClient.cpp b/examples/example_6_rpcClient/rpcClient.cpp index ca49e480..0179231a 100644 --- a/examples/example_6_rpcClient/rpcClient.cpp +++ b/examples/example_6_rpcClient/rpcClient.cpp @@ -38,10 +38,8 @@ rpcClient::rpcClient(QObject *parent) addExtension(m_rpcManager); // observe incoming presences - bool check = connect(this, SIGNAL(presenceReceived(QXmppPresence)), - this, SLOT(slotPresenceReceived(QXmppPresence))); - Q_ASSERT(check); - Q_UNUSED(check); + connect(this, &QXmppClient::presenceReceived, + this, &rpcClient::slotPresenceReceived); } rpcClient::~rpcClient() @@ -73,6 +71,6 @@ void rpcClient::slotPresenceReceived(const QXmppPresence &presence) // invoke the remote method in 1 second m_remoteJid = presence.from(); - QTimer::singleShot(1000, this, SLOT(slotInvokeRemoteMethod())); + QTimer::singleShot(1000, this, &rpcClient::slotInvokeRemoteMethod); } |
