diff options
Diffstat (limited to 'tests/auto/dbus')
21 files changed, 343 insertions, 131 deletions
diff --git a/tests/auto/dbus/qdbusabstractadaptor/qmyserver/qmyserver.cpp b/tests/auto/dbus/qdbusabstractadaptor/qmyserver/qmyserver.cpp index d5d5f2c431..39e6633bfc 100644 --- a/tests/auto/dbus/qdbusabstractadaptor/qmyserver/qmyserver.cpp +++ b/tests/auto/dbus/qdbusabstractadaptor/qmyserver/qmyserver.cpp @@ -43,8 +43,8 @@ #include "../myobject.h" -static const char serviceName[] = "com.trolltech.autotests.qmyserver"; -static const char objectPath[] = "/com/trolltech/qmyserver"; +static const char serviceName[] = "org.qtproject.autotests.qmyserver"; +static const char objectPath[] = "/org/qtproject/qmyserver"; //static const char *interfaceName = serviceName; const char *slotSpy; @@ -55,7 +55,7 @@ Q_DECLARE_METATYPE(QDBusConnection::RegisterOptions) class MyServer : public QDBusServer { Q_OBJECT - Q_CLASSINFO("D-Bus Interface", "com.trolltech.autotests.qmyserver") + Q_CLASSINFO("D-Bus Interface", "org.qtproject.autotests.qmyserver") public: MyServer(QString addr = "unix:tmpdir=/tmp", QObject* parent = 0) diff --git a/tests/auto/dbus/qdbusabstractadaptor/tst_qdbusabstractadaptor.cpp b/tests/auto/dbus/qdbusabstractadaptor/tst_qdbusabstractadaptor.cpp index c14d77eec3..30571fadd6 100644 --- a/tests/auto/dbus/qdbusabstractadaptor/tst_qdbusabstractadaptor.cpp +++ b/tests/auto/dbus/qdbusabstractadaptor/tst_qdbusabstractadaptor.cpp @@ -48,8 +48,8 @@ #include "../qdbusmarshall/common.h" #include "myobject.h" -static const char serviceName[] = "com.trolltech.autotests.qmyserver"; -static const char objectPath[] = "/com/trolltech/qmyserver"; +static const char serviceName[] = "org.qtproject.autotests.qmyserver"; +static const char objectPath[] = "/org/qtproject/qmyserver"; static const char *interfaceName = serviceName; const char *slotSpy; @@ -644,7 +644,7 @@ void tst_QDBusAbstractAdaptor::signalEmissions() QDBusConnection con = QDBusConnection::sessionBus(); QVERIFY(con.isConnected()); - con.registerService("com.trolltech.tst_QDBusAbstractAdaptor"); + con.registerService("org.qtproject.tst_QDBusAbstractAdaptor"); MyObject obj(3); con.registerObject("/", &obj, QDBusConnection::ExportAdaptors diff --git a/tests/auto/dbus/qdbusabstractinterface/interface.h b/tests/auto/dbus/qdbusabstractinterface/interface.h index 2bd99fa11a..94addb7355 100644 --- a/tests/auto/dbus/qdbusabstractinterface/interface.h +++ b/tests/auto/dbus/qdbusabstractinterface/interface.h @@ -78,7 +78,7 @@ Q_DECLARE_METATYPE(UnregisteredType) class Interface: public QObject { Q_OBJECT - Q_CLASSINFO("D-Bus Interface", "com.trolltech.QtDBus.Pinger") + Q_CLASSINFO("D-Bus Interface", "org.qtproject.QtDBus.Pinger") Q_PROPERTY(QString stringProp READ stringProp WRITE setStringProp SCRIPTABLE true) Q_PROPERTY(QDBusVariant variantProp READ variantProp WRITE setVariantProp SCRIPTABLE true) Q_PROPERTY(RegisteredType complexProp READ complexProp WRITE setComplexProp SCRIPTABLE true) diff --git a/tests/auto/dbus/qdbusabstractinterface/com.trolltech.QtDBus.Pinger.xml b/tests/auto/dbus/qdbusabstractinterface/org.qtproject.QtDBus.Pinger.xml index d945ec9b43..845e7be5b4 100644 --- a/tests/auto/dbus/qdbusabstractinterface/com.trolltech.QtDBus.Pinger.xml +++ b/tests/auto/dbus/qdbusabstractinterface/org.qtproject.QtDBus.Pinger.xml @@ -1,10 +1,10 @@ <!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> <node> - <interface name="com.trolltech.QtDBus.Pinger"> + <interface name="org.qtproject.QtDBus.Pinger"> <property name="stringProp" type="s" access="readwrite"/> <property name="variantProp" type="v" access="readwrite"/> <property name="complexProp" type="(s)" access="readwrite"> - <annotation name="com.trolltech.QtDBus.QtTypeName" value="RegisteredType"/> + <annotation name="org.qtproject.QtDBus.QtTypeName" value="RegisteredType"/> </property> <signal name="voidSignal"/> <signal name="stringSignal"> @@ -12,7 +12,7 @@ </signal> <signal name="complexSignal"> <arg name="" type="(s)"/> - <annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="RegisteredType"/> + <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="RegisteredType"/> </signal> <method name="voidMethod" /> <method name="sleepMethod"> @@ -24,7 +24,7 @@ </method> <method name="complexMethod"> <arg type="(s)" direction="out"/> - <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="RegisteredType"/> + <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="RegisteredType"/> </method> <method name="multiOutMethod"> <arg type="s" direction="out"/> diff --git a/tests/auto/dbus/qdbusabstractinterface/pinger.cpp b/tests/auto/dbus/qdbusabstractinterface/pinger.cpp index 93d4732f74..a931f41d6f 100644 --- a/tests/auto/dbus/qdbusabstractinterface/pinger.cpp +++ b/tests/auto/dbus/qdbusabstractinterface/pinger.cpp @@ -41,7 +41,7 @@ /* * This file was generated by qdbusxml2cpp version 0.7 - * Command line was: qdbusxml2cpp -i interface.h -p pinger com.trolltech.QtDBus.Pinger.xml + * Command line was: qdbusxml2cpp -i interface.h -p pinger org.qtproject.QtDBus.Pinger.xml * * qdbusxml2cpp is Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). * diff --git a/tests/auto/dbus/qdbusabstractinterface/pinger.h b/tests/auto/dbus/qdbusabstractinterface/pinger.h index eb05d7535a..7fc6e640fe 100644 --- a/tests/auto/dbus/qdbusabstractinterface/pinger.h +++ b/tests/auto/dbus/qdbusabstractinterface/pinger.h @@ -41,7 +41,7 @@ /* * This file was generated by qdbusxml2cpp version 0.7 - * Command line was: qdbusxml2cpp -i interface.h -p pinger com.trolltech.QtDBus.Pinger.xml + * Command line was: qdbusxml2cpp -i interface.h -p pinger org.qtproject.QtDBus.Pinger.xml * * qdbusxml2cpp is Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). * @@ -63,14 +63,14 @@ #include "interface.h" /* - * Proxy class for interface com.trolltech.QtDBus.Pinger + * Proxy class for interface org.qtproject.QtDBus.Pinger */ class ComTrolltechQtDBusPingerInterface: public QDBusAbstractInterface { Q_OBJECT public: static inline const char *staticInterfaceName() - { return "com.trolltech.QtDBus.Pinger"; } + { return "org.qtproject.QtDBus.Pinger"; } public: ComTrolltechQtDBusPingerInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0); diff --git a/tests/auto/dbus/qdbusabstractinterface/qdbusabstractinterface.pro b/tests/auto/dbus/qdbusabstractinterface/qdbusabstractinterface.pro index 9d8d542b88..623b07fcbd 100644 --- a/tests/auto/dbus/qdbusabstractinterface/qdbusabstractinterface.pro +++ b/tests/auto/dbus/qdbusabstractinterface/qdbusabstractinterface.pro @@ -3,4 +3,4 @@ TARGET = tst_qdbusabstractinterface TEMPLATE = subdirs CONFIG += ordered SUBDIRS = qpinger test -OTHER_FILES += com.trolltech.QtDBus.Pinger.xml +OTHER_FILES += org.qtproject.QtDBus.Pinger.xml diff --git a/tests/auto/dbus/qdbusabstractinterface/qpinger/qpinger.cpp b/tests/auto/dbus/qdbusabstractinterface/qpinger/qpinger.cpp index 87c6bad7fc..3ecc839a34 100644 --- a/tests/auto/dbus/qdbusabstractinterface/qpinger/qpinger.cpp +++ b/tests/auto/dbus/qdbusabstractinterface/qpinger/qpinger.cpp @@ -42,14 +42,14 @@ #include <QtDBus/QtDBus> #include "../interface.h" -static const char serviceName[] = "com.trolltech.autotests.qpinger"; -static const char objectPath[] = "/com/trolltech/qpinger"; +static const char serviceName[] = "org.qtproject.autotests.qpinger"; +static const char objectPath[] = "/org/qtproject/qpinger"; //static const char *interfaceName = serviceName; class PingerServer : public QDBusServer { Q_OBJECT - Q_CLASSINFO("D-Bus Interface", "com.trolltech.autotests.qpinger") + Q_CLASSINFO("D-Bus Interface", "org.qtproject.autotests.qpinger") public: PingerServer(QString addr = "unix:tmpdir=/tmp", QObject* parent = 0) : QDBusServer(addr, parent), diff --git a/tests/auto/dbus/qdbusabstractinterface/tst_qdbusabstractinterface.cpp b/tests/auto/dbus/qdbusabstractinterface/tst_qdbusabstractinterface.cpp index b696294005..59ec2955e4 100644 --- a/tests/auto/dbus/qdbusabstractinterface/tst_qdbusabstractinterface.cpp +++ b/tests/auto/dbus/qdbusabstractinterface/tst_qdbusabstractinterface.cpp @@ -49,8 +49,8 @@ #include "interface.h" #include "pinger.h" -static const char serviceName[] = "com.trolltech.autotests.qpinger"; -static const char objectPath[] = "/com/trolltech/qpinger"; +static const char serviceName[] = "org.qtproject.autotests.qpinger"; +static const char objectPath[] = "/org/qtproject/qpinger"; static const char *interfaceName = serviceName; typedef QSharedPointer<com::trolltech::QtDBus::Pinger> Pinger; @@ -452,9 +452,9 @@ void tst_QDBusAbstractInterface::makeAsyncMultiOutCallPeer() QCoreApplication::instance()->processEvents(); } -static const char server_serviceName[] = "com.trolltech.autotests.dbusserver"; -static const char server_objectPath[] = "/com/trolltech/server"; -static const char server_interfaceName[] = "com.trolltech.QtDBus.Pinger"; +static const char server_serviceName[] = "org.qtproject.autotests.dbusserver"; +static const char server_objectPath[] = "/org/qtproject/server"; +static const char server_interfaceName[] = "org.qtproject.QtDBus.Pinger"; class DBusServerThread : public QThread { @@ -975,7 +975,7 @@ void tst_QDBusAbstractInterface::getComplexSignalPeer() void tst_QDBusAbstractInterface::followSignal() { - const QString serviceToFollow = "com.trolltech.tst_qdbusabstractinterface.FollowMe"; + const QString serviceToFollow = "org.qtproject.tst_qdbusabstractinterface.FollowMe"; Pinger p = getPinger(serviceToFollow); QVERIFY2(p, "Not connected to D-Bus"); @@ -1034,9 +1034,9 @@ void tst_QDBusAbstractInterface::createErrors_data() QTest::addColumn<QString>("path"); QTest::addColumn<QString>("errorName"); - QTest::newRow("invalid-service") << "this isn't valid" << "/" << "com.trolltech.QtDBus.Error.InvalidService"; + QTest::newRow("invalid-service") << "this isn't valid" << "/" << "org.qtproject.QtDBus.Error.InvalidService"; QTest::newRow("invalid-path") << QDBusConnection::sessionBus().baseService() << "this isn't valid" - << "com.trolltech.QtDBus.Error.InvalidObjectPath"; + << "org.qtproject.QtDBus.Error.InvalidObjectPath"; } void tst_QDBusAbstractInterface::createErrors() @@ -1055,7 +1055,7 @@ void tst_QDBusAbstractInterface::createErrorsPeer_data() QTest::addColumn<QString>("path"); QTest::addColumn<QString>("errorName"); - QTest::newRow("invalid-path") << "this isn't valid" << "com.trolltech.QtDBus.Error.InvalidObjectPath"; + QTest::newRow("invalid-path") << "this isn't valid" << "org.qtproject.QtDBus.Error.InvalidObjectPath"; } void tst_QDBusAbstractInterface::createErrorsPeer() @@ -1071,10 +1071,10 @@ void tst_QDBusAbstractInterface::createErrorsPeer() void tst_QDBusAbstractInterface::callErrors_data() { createErrors_data(); - QTest::newRow("service-wildcard") << QString() << "/" << "com.trolltech.QtDBus.Error.InvalidService"; + QTest::newRow("service-wildcard") << QString() << "/" << "org.qtproject.QtDBus.Error.InvalidService"; QTest::newRow("path-wildcard") << QDBusConnection::sessionBus().baseService() << QString() - << "com.trolltech.QtDBus.Error.InvalidObjectPath"; - QTest::newRow("full-wildcard") << QString() << QString() << "com.trolltech.QtDBus.Error.InvalidService"; + << "org.qtproject.QtDBus.Error.InvalidObjectPath"; + QTest::newRow("full-wildcard") << QString() << QString() << "org.qtproject.QtDBus.Error.InvalidService"; } void tst_QDBusAbstractInterface::callErrors() @@ -1113,7 +1113,7 @@ void tst_QDBusAbstractInterface::asyncCallErrors() void tst_QDBusAbstractInterface::callErrorsPeer_data() { createErrorsPeer_data(); - QTest::newRow("path-wildcard") << QString() << "com.trolltech.QtDBus.Error.InvalidObjectPath"; + QTest::newRow("path-wildcard") << QString() << "org.qtproject.QtDBus.Error.InvalidObjectPath"; } void tst_QDBusAbstractInterface::callErrorsPeer() diff --git a/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp b/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp index 65b68b7f34..f99220ea1a 100644 --- a/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp +++ b/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp @@ -118,7 +118,7 @@ private slots: void callVirtualObjectLocal(); public: - QString serviceName() const { return "com.trolltech.Qt.Autotests.QDBusConnection"; } + QString serviceName() const { return "org.qtproject.Qt.Autotests.QDBusConnection"; } bool callMethod(const QDBusConnection &conn, const QString &path); bool callMethodPeer(const QDBusConnection &conn, const QString &path); }; @@ -970,7 +970,7 @@ void tst_QDBusConnection::slotsWithLessParameters() { QDBusConnection con = QDBusConnection::sessionBus(); - QDBusMessage signal = QDBusMessage::createSignal("/", "com.trolltech.TestCase", + QDBusMessage signal = QDBusMessage::createSignal("/", "org.qtproject.TestCase", "oneSignal"); signal << "one parameter"; @@ -1051,7 +1051,7 @@ void tst_QDBusConnection::serviceRegistrationRaceCondition() // connect to the signal: RaceConditionSignalWaiter recv; - session.connect(serviceName, "/", "com.trolltech.TestCase", "oneSignal", &recv, SLOT(countUp())); + session.connect(serviceName, "/", "org.qtproject.TestCase", "oneSignal", &recv, SLOT(countUp())); // create a secondary connection and register a name QDBusConnection connection = QDBusConnection::connectToBus(QDBusConnection::SessionBus, connectionName); @@ -1060,7 +1060,7 @@ void tst_QDBusConnection::serviceRegistrationRaceCondition() QVERIFY(connection.registerService(serviceName)); // send a signal - QDBusMessage msg = QDBusMessage::createSignal("/", "com.trolltech.TestCase", "oneSignal"); + QDBusMessage msg = QDBusMessage::createSignal("/", "org.qtproject.TestCase", "oneSignal"); connection.send(msg); // make a blocking call just to be sure that the buffer was flushed diff --git a/tests/auto/dbus/qdbuscontext/tst_qdbuscontext.cpp b/tests/auto/dbus/qdbuscontext/tst_qdbuscontext.cpp index bc06f8e377..3ec9e636a8 100644 --- a/tests/auto/dbus/qdbuscontext/tst_qdbuscontext.cpp +++ b/tests/auto/dbus/qdbuscontext/tst_qdbuscontext.cpp @@ -41,13 +41,13 @@ #include <QtDBus> #include <QtTest> -const char errorName[] = "com.trolltech.tst_QDBusContext.Error"; +const char errorName[] = "org.qtproject.tst_QDBusContext.Error"; const char errorMsg[] = "A generic error"; class TestObject: public QObject, protected QDBusContext { Q_OBJECT - Q_CLASSINFO("D-Bus Interface", "com.trolltech.tst_QDBusContext.TestObject") + Q_CLASSINFO("D-Bus Interface", "org.qtproject.tst_QDBusContext.TestObject") public: inline TestObject(QObject *parent) : QObject(parent) { } public Q_SLOTS: diff --git a/tests/auto/dbus/qdbusinterface/myobject.h b/tests/auto/dbus/qdbusinterface/myobject.h index 94e7b3d4c5..12c8da6ef6 100644 --- a/tests/auto/dbus/qdbusinterface/myobject.h +++ b/tests/auto/dbus/qdbusinterface/myobject.h @@ -50,12 +50,12 @@ Q_DECLARE_METATYPE(QVariantList) class MyObject: public QObject { Q_OBJECT - Q_CLASSINFO("D-Bus Interface", "com.trolltech.QtDBus.MyObject") + Q_CLASSINFO("D-Bus Interface", "org.qtproject.QtDBus.MyObject") Q_CLASSINFO("D-Bus Introspection", "" -" <interface name=\"com.trolltech.QtDBus.MyObject\" >\n" +" <interface name=\"org.qtproject.QtDBus.MyObject\" >\n" " <property access=\"readwrite\" type=\"i\" name=\"prop1\" />\n" " <property name=\"complexProp\" type=\"ai\" access=\"readwrite\">\n" -" <annotation name=\"com.trolltech.QtDBus.QtTypeName\" value=\"QList<int>\"/>\n" +" <annotation name=\"org.qtproject.QtDBus.QtTypeName\" value=\"QList<int>\"/>\n" " </property>\n" " <signal name=\"somethingHappened\" >\n" " <arg direction=\"out\" type=\"s\" />\n" @@ -83,14 +83,14 @@ class MyObject: public QObject " <method name=\"ping\" >\n" " <arg direction=\"in\" type=\"ai\" name=\"ping\" />\n" " <arg direction=\"out\" type=\"ai\" name=\"ping\" />\n" -" <annotation name=\"com.trolltech.QtDBus.QtTypeName.In0\" value=\"QList<int>\"/>\n" -" <annotation name=\"com.trolltech.QtDBus.QtTypeName.Out0\" value=\"QList<int>\"/>\n" +" <annotation name=\"org.qtproject.QtDBus.QtTypeName.In0\" value=\"QList<int>\"/>\n" +" <annotation name=\"org.qtproject.QtDBus.QtTypeName.Out0\" value=\"QList<int>\"/>\n" " </method>\n" " <method name=\"ping_invokable\" >\n" " <arg direction=\"in\" type=\"ai\" name=\"ping_invokable\" />\n" " <arg direction=\"out\" type=\"ai\" name=\"ping_invokable\" />\n" -" <annotation name=\"com.trolltech.QtDBus.QtTypeName.In0\" value=\"QList<int>\"/>\n" -" <annotation name=\"com.trolltech.QtDBus.QtTypeName.Out0\" value=\"QList<int>\"/>\n" +" <annotation name=\"org.qtproject.QtDBus.QtTypeName.In0\" value=\"QList<int>\"/>\n" +" <annotation name=\"org.qtproject.QtDBus.QtTypeName.Out0\" value=\"QList<int>\"/>\n" " </method>\n" " </interface>\n" "") diff --git a/tests/auto/dbus/qdbusinterface/qmyserver/qmyserver.cpp b/tests/auto/dbus/qdbusinterface/qmyserver/qmyserver.cpp index 1815a6ef79..cb3cd1b27e 100644 --- a/tests/auto/dbus/qdbusinterface/qmyserver/qmyserver.cpp +++ b/tests/auto/dbus/qdbusinterface/qmyserver/qmyserver.cpp @@ -43,8 +43,8 @@ #include "../myobject.h" -static const char serviceName[] = "com.trolltech.autotests.qmyserver"; -static const char objectPath[] = "/com/trolltech/qmyserver"; +static const char serviceName[] = "org.qtproject.autotests.qmyserver"; +static const char objectPath[] = "/org/qtproject/qmyserver"; //static const char *interfaceName = serviceName; int MyObject::callCount = 0; @@ -53,7 +53,7 @@ QVariantList MyObject::callArgs; class MyServer : public QDBusServer { Q_OBJECT - Q_CLASSINFO("D-Bus Interface", "com.trolltech.autotests.qmyserver") + Q_CLASSINFO("D-Bus Interface", "org.qtproject.autotests.qmyserver") public: MyServer(QString addr = "unix:tmpdir=/tmp", QObject* parent = 0) diff --git a/tests/auto/dbus/qdbusinterface/tst_qdbusinterface.cpp b/tests/auto/dbus/qdbusinterface/tst_qdbusinterface.cpp index c866c9d155..af2355aa5d 100644 --- a/tests/auto/dbus/qdbusinterface/tst_qdbusinterface.cpp +++ b/tests/auto/dbus/qdbusinterface/tst_qdbusinterface.cpp @@ -50,11 +50,11 @@ #include "../qdbusmarshall/common.h" #include "myobject.h" -#define TEST_INTERFACE_NAME "com.trolltech.QtDBus.MyObject" +#define TEST_INTERFACE_NAME "org.qtproject.QtDBus.MyObject" #define TEST_SIGNAL_NAME "somethingHappened" -static const char serviceName[] = "com.trolltech.autotests.qmyserver"; -static const char objectPath[] = "/com/trolltech/qmyserver"; +static const char serviceName[] = "org.qtproject.autotests.qmyserver"; +static const char objectPath[] = "/org/qtproject/qmyserver"; static const char *interfaceName = serviceName; int MyObject::callCount = 0; @@ -63,9 +63,9 @@ QVariantList MyObject::callArgs; class MyObjectUnknownType: public QObject { Q_OBJECT - Q_CLASSINFO("D-Bus Interface", "com.trolltech.QtDBus.MyObject") + Q_CLASSINFO("D-Bus Interface", "org.qtproject.QtDBus.MyObject") Q_CLASSINFO("D-Bus Introspection", "" -" <interface name=\"com.trolltech.QtDBus.MyObjectUnknownTypes\" >\n" +" <interface name=\"org.qtproject.QtDBus.MyObjectUnknownTypes\" >\n" " <property access=\"readwrite\" type=\"~\" name=\"prop1\" />\n" " <signal name=\"somethingHappened\" >\n" " <arg direction=\"out\" type=\"~\" />\n" @@ -381,7 +381,7 @@ void tst_QDBusInterface::introspectUnknownTypes() MyObjectUnknownType obj; con.registerObject("/unknownTypes", &obj, QDBusConnection::ExportAllContents); QDBusInterface iface(QDBusConnection::sessionBus().baseService(), QLatin1String("/unknownTypes"), - "com.trolltech.QtDBus.MyObjectUnknownTypes"); + "org.qtproject.QtDBus.MyObjectUnknownTypes"); const QMetaObject *mo = iface.metaObject(); QVERIFY(mo->indexOfMethod("regularMethod()") != -1); // this is the control @@ -414,7 +414,7 @@ public: if (path == "/some/path/superNode") return "zitroneneis"; if (path == "/some/path/superNode/foo") - return " <interface name=\"com.trolltech.QtDBus.VirtualObject\">\n" + return " <interface name=\"org.qtproject.QtDBus.VirtualObject\">\n" " <method name=\"klingeling\" />\n" " </interface>\n" ; return QString(); @@ -460,7 +460,7 @@ void tst_QDBusInterface::introspectVirtualObject() QDBusMessage message2 = QDBusMessage::createMethodCall(con.baseService(), path + "/foo", "org.freedesktop.DBus.Introspectable", "Introspect"); QDBusMessage reply2 = con.call(message2, QDBus::Block, 5000); QVERIFY(reply2.arguments().at(0).toString().contains( - QRegExp("<node>.*<interface name=\"com.trolltech.QtDBus.VirtualObject\">" + QRegExp("<node>.*<interface name=\"org.qtproject.QtDBus.VirtualObject\">" ".*<method name=\"klingeling\" />\n" ".*</interface>.*<interface name=") )); } diff --git a/tests/auto/dbus/qdbusmarshall/common.h b/tests/auto/dbus/qdbusmarshall/common.h index f4c10c467d..ed5c03ea64 100644 --- a/tests/auto/dbus/qdbusmarshall/common.h +++ b/tests/auto/dbus/qdbusmarshall/common.h @@ -85,8 +85,8 @@ Q_DECLARE_METATYPE(QList<QList<QDBusSignature> >) typedef QMap<int, QString> IntStringMap; typedef QMap<QString, QString> StringStringMap; typedef QMap<QDBusObjectPath, QString> ObjectPathStringMap; -typedef QHash<qlonglong, QDateTime> LLDateTimeMap; -typedef QHash<QDBusSignature, QString> SignatureStringMap; +typedef QMap<qlonglong, QDateTime> LLDateTimeMap; +typedef QMap<QDBusSignature, QString> SignatureStringMap; Q_DECLARE_METATYPE(IntStringMap) Q_DECLARE_METATYPE(StringStringMap) Q_DECLARE_METATYPE(ObjectPathStringMap) @@ -209,8 +209,8 @@ void commonInit() qDBusRegisterMetaType<QMap<int, QString> >(); qDBusRegisterMetaType<QMap<QString, QString> >(); qDBusRegisterMetaType<QMap<QDBusObjectPath, QString> >(); - qDBusRegisterMetaType<QHash<qlonglong, QDateTime> >(); - qDBusRegisterMetaType<QHash<QDBusSignature, QString> >(); + qDBusRegisterMetaType<QMap<qlonglong, QDateTime> >(); + qDBusRegisterMetaType<QMap<QDBusSignature, QString> >(); qDBusRegisterMetaType<MyStruct>(); qDBusRegisterMetaType<MyVariantMapStruct>(); @@ -418,23 +418,6 @@ bool compare(const QMap<Key, T> &m1, const QMap<Key, T> &m2) return true; } -template<typename Key, typename T> -bool compare(const QHash<Key, T> &m1, const QHash<Key, T> &m2) -{ - if (m1.count() != m2.size()) - return false; - typename QHash<Key, T>::ConstIterator i1 = m1.constBegin(); - typename QHash<Key, T>::ConstIterator end = m1.constEnd(); - for ( ; i1 != end; ++i1) { - typename QHash<Key, T>::ConstIterator i2 = m2.find(i1.key()); - if (i2 == m2.constEnd()) - return false; - if (!compare(*i1, *i2)) - return false; - } - return true; -} - template<typename T> inline bool compare(const QDBusArgument &arg, const QVariant &v2, T * = 0) { @@ -536,10 +519,10 @@ bool compareToArgument(const QDBusArgument &arg, const QVariant &v2) return compare<QMap<QString, QString> >(arg, v2); else if (id == qMetaTypeId<QMap<QDBusObjectPath, QString> >()) return compare<QMap<QDBusObjectPath, QString> >(arg, v2); - else if (id == qMetaTypeId<QHash<qlonglong, QDateTime> >()) - return compare<QHash<qlonglong, QDateTime> >(arg, v2); - else if (id == qMetaTypeId<QHash<QDBusSignature, QString> >()) - return compare<QHash<QDBusSignature, QString> >(arg, v2); + else if (id == qMetaTypeId<QMap<qlonglong, QDateTime> >()) + return compare<QMap<qlonglong, QDateTime> >(arg, v2); + else if (id == qMetaTypeId<QMap<QDBusSignature, QString> >()) + return compare<QMap<QDBusSignature, QString> >(arg, v2); else if (id == qMetaTypeId<QList<QByteArray> >()) return compare<QList<QByteArray> >(arg, v2); @@ -701,11 +684,11 @@ template<> bool compare(const QVariant &v1, const QVariant &v2) else if (id == qMetaTypeId<QMap<QDBusObjectPath, QString> >()) return compare(qvariant_cast<QMap<QDBusObjectPath, QString> >(v1), qvariant_cast<QMap<QDBusObjectPath, QString> >(v2)); - else if (id == qMetaTypeId<QHash<qlonglong, QDateTime> >()) // lldtmap - return compare(qvariant_cast<QHash<qint64, QDateTime> >(v1), qvariant_cast<QHash<qint64, QDateTime> >(v2)); + else if (id == qMetaTypeId<QMap<qlonglong, QDateTime> >()) // lldtmap + return compare(qvariant_cast<QMap<qint64, QDateTime> >(v1), qvariant_cast<QMap<qint64, QDateTime> >(v2)); - else if (id == qMetaTypeId<QHash<QDBusSignature, QString> >()) - return compare(qvariant_cast<QHash<QDBusSignature, QString> >(v1), qvariant_cast<QHash<QDBusSignature, QString> >(v2)); + else if (id == qMetaTypeId<QMap<QDBusSignature, QString> >()) + return compare(qvariant_cast<QMap<QDBusSignature, QString> >(v1), qvariant_cast<QMap<QDBusSignature, QString> >(v2)); else if (id == qMetaTypeId<MyStruct>()) // (is) return qvariant_cast<MyStruct>(v1) == qvariant_cast<MyStruct>(v2); diff --git a/tests/auto/dbus/qdbusmarshall/qpong/qpong.cpp b/tests/auto/dbus/qdbusmarshall/qpong/qpong.cpp index 39779c1fd9..564b82af35 100644 --- a/tests/auto/dbus/qdbusmarshall/qpong/qpong.cpp +++ b/tests/auto/dbus/qdbusmarshall/qpong/qpong.cpp @@ -41,14 +41,14 @@ #include <QtCore/QtCore> #include <QtDBus/QtDBus> -static const char serviceName[] = "com.trolltech.autotests.qpong"; -static const char objectPath[] = "/com/trolltech/qpong"; +static const char serviceName[] = "org.qtproject.autotests.qpong"; +static const char objectPath[] = "/org/qtproject/qpong"; //static const char *interfaceName = serviceName; class Pong: public QObject { Q_OBJECT - Q_CLASSINFO("D-Bus Interface", "com.trolltech.autotests.qpong") + Q_CLASSINFO("D-Bus Interface", "org.qtproject.autotests.qpong") public slots: void ping(QDBusMessage msg) diff --git a/tests/auto/dbus/qdbusmarshall/tst_qdbusmarshall.cpp b/tests/auto/dbus/qdbusmarshall/tst_qdbusmarshall.cpp index e8f5b255ab..8412fb85be 100644 --- a/tests/auto/dbus/qdbusmarshall/tst_qdbusmarshall.cpp +++ b/tests/auto/dbus/qdbusmarshall/tst_qdbusmarshall.cpp @@ -49,8 +49,8 @@ #include <dbus/dbus.h> -static const char serviceName[] = "com.trolltech.autotests.qpong"; -static const char objectPath[] = "/com/trolltech/qpong"; +static const char serviceName[] = "org.qtproject.autotests.qpong"; +static const char objectPath[] = "/org/qtproject/qpong"; static const char *interfaceName = serviceName; class tst_QDBusMarshall: public QObject @@ -502,7 +502,7 @@ void tst_QDBusMarshall::sendMaps_data() QTest::newRow("os-map") << qVariantFromValue(osmap) << "a{os}" << "[Argument: a{os} {[ObjectPath: /] = \"root\", [ObjectPath: /bar/baz] = \"bar and baz\", [ObjectPath: /foo] = \"foo\"}]"; - QHash<QDBusSignature, QString> gsmap; + QMap<QDBusSignature, QString> gsmap; QTest::newRow("empty-gs-map") << qVariantFromValue(gsmap) << "a{gs}" << "[Argument: a{gs} {}]"; gsmap[QDBusSignature("i")] = "int32"; @@ -601,7 +601,7 @@ void tst_QDBusMarshall::sendComplex_data() QTest::newRow("datetimelist") << qVariantFromValue(dtlist) << "a((iii)(iiii)i)" << "[Argument: a((iii)(iiii)i) {[Argument: ((iii)(iiii)i) [Argument: (iii) 0, 0, 0], [Argument: (iiii) -1, -1, -1, -1], 0], [Argument: ((iii)(iiii)i) [Argument: (iii) 1977, 9, 13], [Argument: (iiii) 0, 0, 0, 0], 0], [Argument: ((iii)(iiii)i) [Argument: (iii) 2006, 6, 18], [Argument: (iiii) 13, 14, 0, 0], 0]}]"; - QHash<qlonglong, QDateTime> lldtmap; + QMap<qlonglong, QDateTime> lldtmap; QTest::newRow("empty-lldtmap") << qVariantFromValue(lldtmap) << "a{x((iii)(iiii)i)}" << "[Argument: a{x((iii)(iiii)i)} {}]"; lldtmap[0] = QDateTime(); @@ -621,7 +621,7 @@ void tst_QDBusMarshall::sendComplex_data() ssmap["c"] = "b"; ssmap["b"] = "c"; - QHash<QDBusSignature, QString> gsmap; + QMap<QDBusSignature, QString> gsmap; gsmap[QDBusSignature("i")] = "int32"; gsmap[QDBusSignature("s")] = "string"; gsmap[QDBusSignature("a{gs}")] = "array of dict_entry of (signature, string)"; @@ -925,29 +925,29 @@ void tst_QDBusMarshall::sendCallErrors_data() // this error comes from the bus server QTest::newRow("empty-service") << "" << objectPath << interfaceName << "ping" << QVariantList() << "org.freedesktop.DBus.Error.UnknownMethod" - << "Method \"ping\" with signature \"\" on interface \"com.trolltech.autotests.qpong\" doesn't exist\n" << (const char*)0; + << "Method \"ping\" with signature \"\" on interface \"org.qtproject.autotests.qpong\" doesn't exist\n" << (const char*)0; QTest::newRow("invalid-service") << "this isn't valid" << objectPath << interfaceName << "ping" << QVariantList() - << "com.trolltech.QtDBus.Error.InvalidService" + << "org.qtproject.QtDBus.Error.InvalidService" << "Invalid service name: this isn't valid" << ""; QTest::newRow("empty-path") << serviceName << "" << interfaceName << "ping" << QVariantList() - << "com.trolltech.QtDBus.Error.InvalidObjectPath" + << "org.qtproject.QtDBus.Error.InvalidObjectPath" << "Object path cannot be empty" << ""; QTest::newRow("invalid-path") << serviceName << "//" << interfaceName << "ping" << QVariantList() - << "com.trolltech.QtDBus.Error.InvalidObjectPath" + << "org.qtproject.QtDBus.Error.InvalidObjectPath" << "Invalid object path: //" << ""; // empty interfaces are valid QTest::newRow("invalid-interface") << serviceName << objectPath << "this isn't valid" << "ping" << QVariantList() - << "com.trolltech.QtDBus.Error.InvalidInterface" + << "org.qtproject.QtDBus.Error.InvalidInterface" << "Invalid interface class: this isn't valid" << ""; QTest::newRow("empty-method") << serviceName << objectPath << interfaceName << "" << QVariantList() - << "com.trolltech.QtDBus.Error.InvalidMember" + << "org.qtproject.QtDBus.Error.InvalidMember" << "method name cannot be empty" << ""; QTest::newRow("invalid-method") << serviceName << objectPath << interfaceName << "this isn't valid" << QVariantList() - << "com.trolltech.QtDBus.Error.InvalidMember" + << "org.qtproject.QtDBus.Error.InvalidMember" << "Invalid method name: this isn't valid" << ""; QTest::newRow("invalid-variant1") << serviceName << objectPath << interfaceName << "ping" diff --git a/tests/auto/dbus/qdbusmetaobject/tst_qdbusmetaobject.cpp b/tests/auto/dbus/qdbusmetaobject/tst_qdbusmetaobject.cpp index ed4ed4c6a2..b459fdc1b1 100644 --- a/tests/auto/dbus/qdbusmetaobject/tst_qdbusmetaobject.cpp +++ b/tests/auto/dbus/qdbusmetaobject/tst_qdbusmetaobject.cpp @@ -297,7 +297,7 @@ signals: }; const char TypesTest16_xml[] = "<signal name=\"signal\"><arg type=\"(ss)\"/>" - "<annotation name=\"com.trolltech.QtDBus.QtTypeName.Out0\" value=\"StringPair\"></signal>"; + "<annotation name=\"org.qtproject.QtDBus.QtTypeName.Out0\" value=\"StringPair\"></signal>"; class TypesTest17: public QObject { @@ -308,7 +308,7 @@ signals: }; const char TypesTest17_xml[] = "<signal name=\"signal\"><arg type=\"(s)\"/>" - "<annotation name=\"com.trolltech.QtDBus.QtTypeName.Out0\" value=\"Struct1\"></signal>"; + "<annotation name=\"org.qtproject.QtDBus.QtTypeName.Out0\" value=\"Struct1\"></signal>"; class TypesTest18: public QObject { @@ -319,7 +319,7 @@ signals: }; const char TypesTest18_xml[] = "<signal name=\"signal\"><arg type=\"(ssa(ss)sayasx)\"/>" - "<annotation name=\"com.trolltech.QtDBus.QtTypeName.Out0\" value=\"Struct4\"></signal>"; + "<annotation name=\"org.qtproject.QtDBus.QtTypeName.Out0\" value=\"Struct4\"></signal>"; class TypesTest19: public QObject { @@ -330,7 +330,7 @@ signals: }; const char TypesTest19_xml[] = "<signal name=\"signal\"><arg type=\"av\"/>" - "<annotation name=\"com.trolltech.QtDBus.QtTypeName.Out0\" value=\"QVariantList\"></signal>"; + "<annotation name=\"org.qtproject.QtDBus.QtTypeName.Out0\" value=\"QVariantList\"></signal>"; class TypesTest20: public QObject { @@ -341,8 +341,12 @@ signals: }; const char TypesTest20_xml[] = "<signal name=\"signal\"><arg type=\"a{sv}\"/>" + "<annotation name=\"org.qtproject.QtDBus.QtTypeName.Out0\" value=\"QVariantMap\"></signal>"; +const char TypesTest20_oldxml[] = + "<signal name=\"signal\"><arg type=\"a{sv}\"/>" "<annotation name=\"com.trolltech.QtDBus.QtTypeName.Out0\" value=\"QVariantMap\"></signal>"; + void tst_QDBusMetaObject::types_data() { QTest::addColumn<const QMetaObject *>("metaobject"); @@ -368,6 +372,7 @@ void tst_QDBusMetaObject::types_data() QTest::newRow("Struct4") << &TypesTest18::staticMetaObject << QString(TypesTest18_xml); QTest::newRow("QVariantList") << &TypesTest19::staticMetaObject << QString(TypesTest19_xml); QTest::newRow("QVariantMap") << &TypesTest20::staticMetaObject << QString(TypesTest20_xml); + QTest::newRow("QVariantMap-oldannotation") << &TypesTest20::staticMetaObject << QString(TypesTest20_oldxml); } void tst_QDBusMetaObject::types() @@ -397,16 +402,21 @@ void tst_QDBusMetaObject::types() for (int i = metaobject->methodOffset(); i < metaobject->methodCount(); ++i) { QMetaMethod expected = metaobject->method(i); - int methodIdx = result->indexOfMethod(expected.signature()); + int methodIdx = result->indexOfMethod(expected.methodSignature().constData()); QVERIFY(methodIdx != -1); QMetaMethod constructed = result->method(methodIdx); QCOMPARE(int(constructed.access()), int(expected.access())); QCOMPARE(int(constructed.methodType()), int(expected.methodType())); + QCOMPARE(constructed.name(), expected.name()); + QCOMPARE(constructed.parameterCount(), expected.parameterCount()); QCOMPARE(constructed.parameterNames(), expected.parameterNames()); QCOMPARE(constructed.parameterTypes(), expected.parameterTypes()); + for (int j = 0; j < constructed.parameterCount(); ++j) + QCOMPARE(constructed.parameterType(j), expected.parameterType(j)); QCOMPARE(constructed.tag(), expected.tag()); QCOMPARE(constructed.typeName(), expected.typeName()); + QCOMPARE(constructed.returnType(), expected.returnType()); } for (int i = metaobject->propertyOffset(); i < metaobject->propertyCount(); ++i) { @@ -427,6 +437,8 @@ void tst_QDBusMetaObject::types() QCOMPARE(constructed.isUser(), expected.isUser()); QCOMPARE(constructed.isWritable(), expected.isWritable()); QCOMPARE(constructed.typeName(), expected.typeName()); + QCOMPARE(constructed.type(), expected.type()); + QCOMPARE(constructed.userType(), expected.userType()); } } @@ -664,9 +676,207 @@ public: }; const char PropertyTest4_xml[] = "<property name=\"property\" type=\"(s)\" access=\"write\">" - "<annotation name=\"com.trolltech.QtDBus.QtTypeName\" value=\"Struct1\"/>" + "<annotation name=\"org.qtproject.QtDBus.QtTypeName\" value=\"Struct1\"/>" "</property>"; +class PropertyTest_b: public QObject +{ + Q_OBJECT + Q_PROPERTY(bool property READ property WRITE setProperty) +public: + bool property() { return false; } + void setProperty(bool) { } +}; +const char PropertyTest_b_xml[] = + "<property name=\"property\" type=\"b\" access=\"readwrite\"/>"; + +class PropertyTest_y: public QObject +{ + Q_OBJECT + Q_PROPERTY(uchar property READ property WRITE setProperty) +public: + uchar property() { return 0; } + void setProperty(uchar) { } +}; +const char PropertyTest_y_xml[] = + "<property name=\"property\" type=\"y\" access=\"readwrite\"/>"; + +class PropertyTest_n: public QObject +{ + Q_OBJECT + Q_PROPERTY(short property READ property WRITE setProperty) +public: + short property() { return 0; } + void setProperty(short) { } +}; +const char PropertyTest_n_xml[] = + "<property name=\"property\" type=\"n\" access=\"readwrite\"/>"; + +class PropertyTest_q: public QObject +{ + Q_OBJECT + Q_PROPERTY(ushort property READ property WRITE setProperty) +public: + ushort property() { return 0; } + void setProperty(ushort) { } +}; +const char PropertyTest_q_xml[] = + "<property name=\"property\" type=\"q\" access=\"readwrite\"/>"; + +class PropertyTest_u: public QObject +{ + Q_OBJECT + Q_PROPERTY(uint property READ property WRITE setProperty) +public: + uint property() { return 0; } + void setProperty(uint) { } +}; +const char PropertyTest_u_xml[] = + "<property name=\"property\" type=\"u\" access=\"readwrite\"/>"; + +class PropertyTest_x: public QObject +{ + Q_OBJECT + Q_PROPERTY(qlonglong property READ property WRITE setProperty) +public: + qlonglong property() { return 0; } + void setProperty(qlonglong) { } +}; +const char PropertyTest_x_xml[] = + "<property name=\"property\" type=\"x\" access=\"readwrite\"/>"; + +class PropertyTest_t: public QObject +{ + Q_OBJECT + Q_PROPERTY(qulonglong property READ property WRITE setProperty) +public: + qulonglong property() { return 0; } + void setProperty(qulonglong) { } +}; +const char PropertyTest_t_xml[] = + "<property name=\"property\" type=\"t\" access=\"readwrite\"/>"; + +class PropertyTest_d: public QObject +{ + Q_OBJECT + Q_PROPERTY(double property READ property WRITE setProperty) +public: + double property() { return 0; } + void setProperty(double) { } +}; +const char PropertyTest_d_xml[] = + "<property name=\"property\" type=\"d\" access=\"readwrite\"/>"; + +class PropertyTest_s: public QObject +{ + Q_OBJECT + Q_PROPERTY(QString property READ property WRITE setProperty) +public: + QString property() { return QString(); } + void setProperty(QString) { } +}; +const char PropertyTest_s_xml[] = + "<property name=\"property\" type=\"s\" access=\"readwrite\"/>"; + +class PropertyTest_v: public QObject +{ + Q_OBJECT + Q_PROPERTY(QDBusVariant property READ property WRITE setProperty) +public: + QDBusVariant property() { return QDBusVariant(); } + void setProperty(QDBusVariant) { } +}; +const char PropertyTest_v_xml[] = + "<property name=\"property\" type=\"v\" access=\"readwrite\"/>"; + +class PropertyTest_o: public QObject +{ + Q_OBJECT + Q_PROPERTY(QDBusObjectPath property READ property WRITE setProperty) +public: + QDBusObjectPath property() { return QDBusObjectPath(); } + void setProperty(QDBusObjectPath) { } +}; +const char PropertyTest_o_xml[] = + "<property name=\"property\" type=\"o\" access=\"readwrite\"/>"; + +class PropertyTest_g: public QObject +{ + Q_OBJECT + Q_PROPERTY(QDBusSignature property READ property WRITE setProperty) +public: + QDBusSignature property() { return QDBusSignature(); } + void setProperty(QDBusSignature) { } +}; +const char PropertyTest_g_xml[] = + "<property name=\"property\" type=\"g\" access=\"readwrite\"/>"; + +class PropertyTest_h: public QObject +{ + Q_OBJECT + Q_PROPERTY(QDBusUnixFileDescriptor property READ property WRITE setProperty) +public: + QDBusUnixFileDescriptor property() { return QDBusUnixFileDescriptor(); } + void setProperty(QDBusUnixFileDescriptor) { } +}; +const char PropertyTest_h_xml[] = + "<property name=\"property\" type=\"h\" access=\"readwrite\"/>"; + +class PropertyTest_ay: public QObject +{ + Q_OBJECT + Q_PROPERTY(QByteArray property READ property WRITE setProperty) +public: + QByteArray property() { return QByteArray(); } + void setProperty(QByteArray) { } +}; +const char PropertyTest_ay_xml[] = + "<property name=\"property\" type=\"ay\" access=\"readwrite\"/>"; + +class PropertyTest_as: public QObject +{ + Q_OBJECT + Q_PROPERTY(QStringList property READ property WRITE setProperty) +public: + QStringList property() { return QStringList(); } + void setProperty(QStringList) { } +}; +const char PropertyTest_as_xml[] = + "<property name=\"property\" type=\"as\" access=\"readwrite\"/>"; + +class PropertyTest_av: public QObject +{ + Q_OBJECT + Q_PROPERTY(QVariantList property READ property WRITE setProperty) +public: + QVariantList property() { return QVariantList(); } + void setProperty(QVariantList) { } +}; +const char PropertyTest_av_xml[] = + "<property name=\"property\" type=\"av\" access=\"readwrite\"/>"; + +class PropertyTest_ao: public QObject +{ + Q_OBJECT + Q_PROPERTY(QList<QDBusObjectPath> property READ property WRITE setProperty) +public: + QList<QDBusObjectPath> property() { return QList<QDBusObjectPath>(); } + void setProperty(QList<QDBusObjectPath>) { } +}; +const char PropertyTest_ao_xml[] = + "<property name=\"property\" type=\"ao\" access=\"readwrite\"/>"; + +class PropertyTest_ag: public QObject +{ + Q_OBJECT + Q_PROPERTY(QList<QDBusSignature> property READ property WRITE setProperty) +public: + QList<QDBusSignature> property() { return QList<QDBusSignature>(); } + void setProperty(QList<QDBusSignature>) { } +}; +const char PropertyTest_ag_xml[] = + "<property name=\"property\" type=\"ag\" access=\"readwrite\"/>"; + void tst_QDBusMetaObject::properties_data() { QTest::addColumn<const QMetaObject *>("metaobject"); @@ -676,6 +886,25 @@ void tst_QDBusMetaObject::properties_data() QTest::newRow("readwrite") << &PropertyTest2::staticMetaObject << QString(PropertyTest2_xml); QTest::newRow("write") << &PropertyTest3::staticMetaObject << QString(PropertyTest3_xml); QTest::newRow("customtype") << &PropertyTest4::staticMetaObject << QString(PropertyTest4_xml); + + QTest::newRow("bool") << &PropertyTest_b::staticMetaObject << QString(PropertyTest_b_xml); + QTest::newRow("byte") << &PropertyTest_y::staticMetaObject << QString(PropertyTest_y_xml); + QTest::newRow("short") << &PropertyTest_n::staticMetaObject << QString(PropertyTest_n_xml); + QTest::newRow("ushort") << &PropertyTest_q::staticMetaObject << QString(PropertyTest_q_xml); + QTest::newRow("uint") << &PropertyTest_u::staticMetaObject << QString(PropertyTest_u_xml); + QTest::newRow("qlonglong") << &PropertyTest_x::staticMetaObject << QString(PropertyTest_x_xml); + QTest::newRow("qulonglong") << &PropertyTest_t::staticMetaObject << QString(PropertyTest_t_xml); + QTest::newRow("double") << &PropertyTest_d::staticMetaObject << QString(PropertyTest_d_xml); + QTest::newRow("QString") << &PropertyTest_s::staticMetaObject << QString(PropertyTest_s_xml); + QTest::newRow("QDBusVariant") << &PropertyTest_v::staticMetaObject << QString(PropertyTest_v_xml); + QTest::newRow("QDBusObjectPath") << &PropertyTest_o::staticMetaObject << QString(PropertyTest_o_xml); + QTest::newRow("QDBusSignature") << &PropertyTest_g::staticMetaObject << QString(PropertyTest_g_xml); + QTest::newRow("QDBusUnixFileDescriptor") << &PropertyTest_h::staticMetaObject << QString(PropertyTest_h_xml); + QTest::newRow("QByteArray") << &PropertyTest_ay::staticMetaObject << QString(PropertyTest_ay_xml); + QTest::newRow("QStringList") << &PropertyTest_as::staticMetaObject << QString(PropertyTest_as_xml); + QTest::newRow("QVariantList") << &PropertyTest_av::staticMetaObject << QString(PropertyTest_av_xml); + QTest::newRow("QList<QDBusObjectPath>") << &PropertyTest_ao::staticMetaObject << QString(PropertyTest_ao_xml); + QTest::newRow("QList<QDBusSignature>") << &PropertyTest_ag::staticMetaObject << QString(PropertyTest_ag_xml); } void tst_QDBusMetaObject::properties() diff --git a/tests/auto/dbus/qdbuspendingcall/tst_qdbuspendingcall.cpp b/tests/auto/dbus/qdbuspendingcall/tst_qdbuspendingcall.cpp index 60a8061ae4..eca352456f 100644 --- a/tests/auto/dbus/qdbuspendingcall/tst_qdbuspendingcall.cpp +++ b/tests/auto/dbus/qdbuspendingcall/tst_qdbuspendingcall.cpp @@ -46,12 +46,12 @@ #include <QtTest/QtTest> #include <QtDBus> -#define TEST_INTERFACE_NAME "com.trolltech.QtDBus.MyObject" +#define TEST_INTERFACE_NAME "org.qtproject.QtDBus.MyObject" class MyObject : public QDBusAbstractAdaptor { Q_OBJECT - Q_CLASSINFO("D-Bus Interface", "com.trolltech.QtDBus.MyObject") + Q_CLASSINFO("D-Bus Interface", "org.qtproject.QtDBus.MyObject") public: MyObject(QObject* parent =0) diff --git a/tests/auto/dbus/qdbuspendingreply/tst_qdbuspendingreply.cpp b/tests/auto/dbus/qdbuspendingreply/tst_qdbuspendingreply.cpp index 5836945484..6d5bdf7ba6 100644 --- a/tests/auto/dbus/qdbuspendingreply/tst_qdbuspendingreply.cpp +++ b/tests/auto/dbus/qdbuspendingreply/tst_qdbuspendingreply.cpp @@ -106,7 +106,7 @@ private slots: class TypesInterface: public QDBusAbstractAdaptor { Q_OBJECT - Q_CLASSINFO("D-Bus Interface", "com.trolltech.Qt.Autotests.TypesInterface") + Q_CLASSINFO("D-Bus Interface", "org.qtproject.Qt.Autotests.TypesInterface") public: TypesInterface(QObject *parent) : QDBusAbstractAdaptor(parent) @@ -241,7 +241,7 @@ tst_QDBusPendingReply::tst_QDBusPendingReply() QDBusConnection::sessionBus().registerObject("/", this); iface = new QDBusInterface(QDBusConnection::sessionBus().baseService(), "/", - "com.trolltech.Qt.Autotests.TypesInterface", + "org.qtproject.Qt.Autotests.TypesInterface", QDBusConnection::sessionBus(), this); } @@ -474,77 +474,77 @@ void tst_QDBusPendingReply::multipleTypes() void tst_QDBusPendingReply::synchronousSimpleTypes() { - QDBusPendingReply<bool> rbool = iface->call("retrieveBool"); + QDBusPendingReply<bool> rbool(iface->call("retrieveBool")); rbool.waitForFinished(); QVERIFY(rbool.isFinished()); QCOMPARE(rbool.argumentAt<0>(), adaptor->retrieveBool()); - QDBusPendingReply<uchar> ruchar = iface->call("retrieveUChar"); + QDBusPendingReply<uchar> ruchar(iface->call("retrieveUChar")); ruchar.waitForFinished(); QVERIFY(ruchar.isFinished()); QCOMPARE(ruchar.argumentAt<0>(), adaptor->retrieveUChar()); - QDBusPendingReply<short> rshort = iface->call("retrieveShort"); + QDBusPendingReply<short> rshort(iface->call("retrieveShort")); rshort.waitForFinished(); QVERIFY(rshort.isFinished()); QCOMPARE(rshort.argumentAt<0>(), adaptor->retrieveShort()); - QDBusPendingReply<ushort> rushort = iface->call("retrieveUShort"); + QDBusPendingReply<ushort> rushort(iface->call("retrieveUShort")); rushort.waitForFinished(); QVERIFY(rushort.isFinished()); QCOMPARE(rushort.argumentAt<0>(), adaptor->retrieveUShort()); - QDBusPendingReply<int> rint = iface->call("retrieveInt"); + QDBusPendingReply<int> rint(iface->call("retrieveInt")); rint.waitForFinished(); QVERIFY(rint.isFinished()); QCOMPARE(rint.argumentAt<0>(), adaptor->retrieveInt()); - QDBusPendingReply<uint> ruint = iface->call("retrieveUInt"); + QDBusPendingReply<uint> ruint(iface->call("retrieveUInt")); ruint.waitForFinished(); QVERIFY(ruint.isFinished()); QCOMPARE(ruint.argumentAt<0>(), adaptor->retrieveUInt()); - QDBusPendingReply<qlonglong> rqlonglong = iface->call("retrieveLongLong"); + QDBusPendingReply<qlonglong> rqlonglong(iface->call("retrieveLongLong")); rqlonglong.waitForFinished(); QVERIFY(rqlonglong.isFinished()); QCOMPARE(rqlonglong.argumentAt<0>(), adaptor->retrieveLongLong()); - QDBusPendingReply<qulonglong> rqulonglong = iface->call("retrieveULongLong"); + QDBusPendingReply<qulonglong> rqulonglong(iface->call("retrieveULongLong")); rqulonglong.waitForFinished(); QVERIFY(rqulonglong.isFinished()); QCOMPARE(rqulonglong.argumentAt<0>(), adaptor->retrieveULongLong()); - QDBusPendingReply<double> rdouble = iface->call("retrieveDouble"); + QDBusPendingReply<double> rdouble(iface->call("retrieveDouble")); rdouble.waitForFinished(); QVERIFY(rdouble.isFinished()); QCOMPARE(rdouble.argumentAt<0>(), adaptor->retrieveDouble()); - QDBusPendingReply<QString> rstring = iface->call("retrieveString"); + QDBusPendingReply<QString> rstring(iface->call("retrieveString")); rstring.waitForFinished(); QVERIFY(rstring.isFinished()); QCOMPARE(rstring.argumentAt<0>(), adaptor->retrieveString()); - QDBusPendingReply<QDBusObjectPath> robjectpath = iface->call("retrieveObjectPath"); + QDBusPendingReply<QDBusObjectPath> robjectpath(iface->call("retrieveObjectPath")); robjectpath.waitForFinished(); QVERIFY(robjectpath.isFinished()); QCOMPARE(robjectpath.argumentAt<0>().path(), adaptor->retrieveObjectPath().path()); - QDBusPendingReply<QDBusSignature> rsignature = iface->call("retrieveSignature"); + QDBusPendingReply<QDBusSignature> rsignature(iface->call("retrieveSignature")); rsignature.waitForFinished(); QVERIFY(rsignature.isFinished()); QCOMPARE(rsignature.argumentAt<0>().signature(), adaptor->retrieveSignature().signature()); - QDBusPendingReply<QDBusVariant> rdbusvariant = iface->call("retrieveVariant"); + QDBusPendingReply<QDBusVariant> rdbusvariant(iface->call("retrieveVariant")); rdbusvariant.waitForFinished(); QVERIFY(rdbusvariant.isFinished()); QCOMPARE(rdbusvariant.argumentAt<0>().variant(), adaptor->retrieveVariant().variant()); - QDBusPendingReply<QByteArray> rbytearray = iface->call("retrieveByteArray"); + QDBusPendingReply<QByteArray> rbytearray(iface->call("retrieveByteArray")); rbytearray.waitForFinished(); QVERIFY(rbytearray.isFinished()); QCOMPARE(rbytearray.argumentAt<0>(), adaptor->retrieveByteArray()); - QDBusPendingReply<QStringList> rstringlist = iface->call("retrieveStringList"); + QDBusPendingReply<QStringList> rstringlist(iface->call("retrieveStringList")); rstringlist.waitForFinished(); QVERIFY(rstringlist.isFinished()); QCOMPARE(rstringlist.argumentAt<0>(), adaptor->retrieveStringList()); @@ -559,28 +559,28 @@ void tst_QDBusPendingReply::errors() { QDBusError error; - QDBusPendingReply<> rvoid = iface->asyncCall("sendError"); + QDBusPendingReply<> rvoid(iface->asyncCall("sendError")); rvoid.waitForFinished(); QVERIFY(rvoid.isFinished()); QVERIFY(rvoid.isError()); error = rvoid.error(); VERIFY_ERROR(error); - QDBusPendingReply<int> rint = iface->asyncCall("sendError"); + QDBusPendingReply<int> rint(iface->asyncCall("sendError")); rint.waitForFinished(); QVERIFY(rint.isFinished()); QVERIFY(rint.isError()); error = rint.error(); VERIFY_ERROR(error); - QDBusPendingReply<int,int> rintint = iface->asyncCall("sendError"); + QDBusPendingReply<int,int> rintint(iface->asyncCall("sendError")); rintint.waitForFinished(); QVERIFY(rintint.isFinished()); QVERIFY(rintint.isError()); error = rintint.error(); VERIFY_ERROR(error); - QDBusPendingReply<QString> rstring = iface->asyncCall("sendError"); + QDBusPendingReply<QString> rstring(iface->asyncCall("sendError")); rstring.waitForFinished(); QVERIFY(rstring.isFinished()); QVERIFY(rstring.isError()); diff --git a/tests/auto/dbus/qdbusreply/tst_qdbusreply.cpp b/tests/auto/dbus/qdbusreply/tst_qdbusreply.cpp index b6026f215b..a5ccd24735 100644 --- a/tests/auto/dbus/qdbusreply/tst_qdbusreply.cpp +++ b/tests/auto/dbus/qdbusreply/tst_qdbusreply.cpp @@ -102,7 +102,7 @@ private slots: class TypesInterface: public QDBusAbstractAdaptor { Q_OBJECT - Q_CLASSINFO("D-Bus Interface", "com.trolltech.Qt.Autotests.TypesInterface") + Q_CLASSINFO("D-Bus Interface", "org.qtproject.Qt.Autotests.TypesInterface") public: TypesInterface(QObject *parent) : QDBusAbstractAdaptor(parent) @@ -226,7 +226,7 @@ tst_QDBusReply::tst_QDBusReply() QDBusConnection::sessionBus().registerObject("/", this); iface = new QDBusInterface(QDBusConnection::sessionBus().baseService(), "/", - "com.trolltech.Qt.Autotests.TypesInterface", + "org.qtproject.Qt.Autotests.TypesInterface", QDBusConnection::sessionBus(), this); } |