From fd5ac15ebc643635e436b64cf1e656284380b1a5 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sun, 11 Jun 2006 12:18:23 +0000 Subject: * 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. --- test/qt/qpong.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'test/qt/qpong.cpp') 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 #include -#include 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; -- cgit