summaryrefslogtreecommitdiffstats
path: root/test/qt/qpong.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago@kde.org>2006-03-28 18:58:58 +0000
committerThiago Macieira <thiago@kde.org>2006-03-28 18:58:58 +0000
commitd54ababd5f67bb621c1b3a911d0853c23df817a1 (patch)
tree8ff32adfe2806e65e69a6965d75efe00fc97b7ff /test/qt/qpong.cpp
parentd42c8663e8fd441838a238bfb845a7c80c37b253 (diff)
* test/qt/*: Sync with KDE Subversion revision 523647.
Update the testcases to the new API. Remove testcases for classes that are no longer public or have been removed.
Diffstat (limited to 'test/qt/qpong.cpp')
-rw-r--r--test/qt/qpong.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/qt/qpong.cpp b/test/qt/qpong.cpp
index 38e5c78d..4a3e9763 100644
--- a/test/qt/qpong.cpp
+++ b/test/qt/qpong.cpp
@@ -1,6 +1,6 @@
-#define DBUS_API_SUBJECT_TO_CHANGE
#include <QtCore/QtCore>
#include <dbus/qdbus.h>
+#include <dbus/dbus.h>
class Pong: public QObject
{
@@ -11,6 +11,7 @@ public slots:
{
QDBusMessage reply = QDBusMessage::methodReply(msg);
reply << static_cast<QList<QVariant> >(msg);
+ reply.setSignature(msg.signature());
if (!msg.connection().send(reply))
exit(1);
}
@@ -21,7 +22,13 @@ int main(int argc, char *argv[])
QCoreApplication app(argc, argv);
QDBusConnection &con = QDBus::sessionBus();
- if (!con.requestName("org.kde.selftest"))
+ 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)
exit(2);
Pong pong;