diff options
| author | Linus Jahn <lnj@kaidan.im> | 2022-09-05 20:37:05 +0200 |
|---|---|---|
| committer | Linus Jahn <lnj@kaidan.im> | 2022-09-06 00:46:56 +0200 |
| commit | 5f813f8a4bbe1e075daad7b3933829044befffb4 (patch) | |
| tree | 20102aa665b03cfb6dfe0c6ece94938320b6430e /examples/example_6_rpcClient | |
| parent | 4c60b13e0b8011e4e0b093a690e939f3b23e2436 (diff) | |
Reformat code
Diffstat (limited to 'examples/example_6_rpcClient')
| -rw-r--r-- | examples/example_6_rpcClient/rpcClient.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/example_6_rpcClient/rpcClient.cpp b/examples/example_6_rpcClient/rpcClient.cpp index e2bc392a..77ef7081 100644 --- a/examples/example_6_rpcClient/rpcClient.cpp +++ b/examples/example_6_rpcClient/rpcClient.cpp @@ -31,10 +31,11 @@ void rpcClient::slotInvokeRemoteMethod() { QXmppRemoteMethodResult methodResult = m_rpcManager->callRemoteMethod( m_remoteJid, "RemoteInterface.echoString", "This is a test"); - if (methodResult.hasError) + if (methodResult.hasError) { qDebug() << "Error:" << methodResult.code << methodResult.errorMessage; - else + } else { qDebug() << "Result:" << methodResult.result; + } } /// A presence was received. @@ -47,8 +48,9 @@ void rpcClient::slotPresenceReceived(const QXmppPresence &presence) // do nothing if (QXmppUtils::jidToBareJid(configuration().jid()) == recipient || QXmppUtils::jidToBareJid(presence.from()) != recipient || - presence.type() != QXmppPresence::Available) + presence.type() != QXmppPresence::Available) { return; + } // invoke the remote method in 1 second m_remoteJid = presence.from(); |
