summaryrefslogtreecommitdiffstats
path: root/test/qt/qpong.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago@kde.org>2006-06-11 12:18:23 +0000
committerThiago Macieira <thiago@kde.org>2006-06-11 12:18:23 +0000
commitfd5ac15ebc643635e436b64cf1e656284380b1a5 (patch)
treef1630dd4f97b5f56c61150ee2a0186831d81c256 /test/qt/qpong.cpp
parent3b50a8c9fe65839b79f8df988aee6124abd4f0c4 (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.cpp12
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;