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:
682 bytes
|
Line | |
---|
1 | //! [0]
|
---|
2 | QString value = retrieveValue();
|
---|
3 | QDBusMessage reply;
|
---|
4 |
|
---|
5 | QDBusReply<int> api = interface->call(QLatin1String("GetAPIVersion"));
|
---|
6 | if (api >= 14)
|
---|
7 | reply = interface->call(QLatin1String("ProcessWorkUnicode"), value);
|
---|
8 | else
|
---|
9 | reply = interface->call(QLatin1String("ProcessWork"), QLatin1String("UTF-8"), value.toUtf8());
|
---|
10 | //! [0]
|
---|
11 |
|
---|
12 | //! [1]
|
---|
13 | QString value = retrieveValue();
|
---|
14 | QDBusPendingCall pcall = interface->asyncCall(QLatin1String("Process"), value);
|
---|
15 |
|
---|
16 | QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(pcall, this);
|
---|
17 |
|
---|
18 | QObject::connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)),
|
---|
19 | this, SLOT(callFinishedSlot(QDBusPendingCallWatcher*)));
|
---|
20 | //! [1]
|
---|
Note:
See
TracBrowser
for help on using the repository browser.