diff options
author | Thiago Macieira <thiago@kde.org> | 2006-06-11 12:18:23 +0000 |
---|---|---|
committer | Thiago Macieira <thiago@kde.org> | 2006-06-11 12:18:23 +0000 |
commit | fd5ac15ebc643635e436b64cf1e656284380b1a5 (patch) | |
tree | f1630dd4f97b5f56c61150ee2a0186831d81c256 /test/qt/qpong.cpp | |
parent | 3b50a8c9fe65839b79f8df988aee6124abd4f0c4 (diff) |
* test/qt/*: Update the testcases, including testing the new
functionality of sending null QByteArray and QString over the
bus. Add new headertest test and restore the old
qdbusxmlparser test.
Diffstat (limited to 'test/qt/qpong.cpp')
-rw-r--r-- | test/qt/qpong.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/test/qt/qpong.cpp b/test/qt/qpong.cpp index 4a3e9763..cad04eb6 100644 --- a/test/qt/qpong.cpp +++ b/test/qt/qpong.cpp @@ -1,6 +1,5 @@ #include <QtCore/QtCore> #include <dbus/qdbus.h> -#include <dbus/dbus.h> class Pong: public QObject { @@ -22,13 +21,10 @@ int main(int argc, char *argv[]) QCoreApplication app(argc, argv); QDBusConnection &con = QDBus::sessionBus(); - QDBusMessage msg = QDBusMessage::methodCall(DBUS_SERVICE_DBUS, - DBUS_PATH_DBUS, - DBUS_INTERFACE_DBUS, - "RequestName"); - msg << "org.kde.selftest" << 0U; - msg = con.sendWithReply(msg); - if (msg.type() != QDBusMessage::ReplyMessage) + if (!con.isConnected()) + exit(1); + + if (con.busService()->requestName("org.kde.selftest", QDBusBusService::DoNotQueueName).isError()) exit(2); Pong pong; |