source: trunk/doc/src/snippets/code/src.qdbus.qdbuspendingreply.cpp@ 244

Last change on this file since 244 was 2, checked in by Dmitry A. Kuminov, 16 years ago

Initially imported qt-all-opensource-src-4.5.1 from Trolltech.

File size: 617 bytes
Line 
1{
2//! [0]
3 QDBusPendingReply<QString> reply = interface->asyncCall("RemoteMethod");
4 reply.waitForFinished();
5 if (reply.isError())
6 // call failed. Show an error condition.
7 showError(reply.error());
8 else
9 // use the returned value
10 useValue(reply.value());
11//! [0]
12
13//! [2]
14 QDBusPendingReply<bool, QString> reply = interface->asyncCall("RemoteMethod");
15 reply.waitForFinished();
16 if (!reply.isError()) {
17 if (reply.argumentAt<0>())
18 showSuccess(reply.argumentAt<1>());
19 else
20 showFailure(reply.argumentAt<1>());
21 }
22//! [2]
23}
Note: See TracBrowser for help on using the repository browser.