From 8557bc3a605e5d2b1a7dae5999501b19c1c99b58 Mon Sep 17 00:00:00 2001 From: JBB Date: Mon, 20 Jan 2020 00:19:38 +0100 Subject: Port majority of old-style connects (#237) This provides more type safety and is future-proof. --- examples/example_6_rpcClient/rpcClient.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'examples/example_6_rpcClient') 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); } -- cgit v1.2.3