Finish cleaning up com.trolltech -> org.qtproject in QtDBus
authorThiago Macieira <thiago.macieira@intel.com>
Thu, 29 Mar 2012 14:11:03 +0000 (11:11 -0300)
committerQt by Nokia <qt-info@nokia.com>
Sun, 15 Apr 2012 22:07:39 +0000 (00:07 +0200)
Lots of uses of the annotations and error names, plus a bunch of local
unit test names (including one file that had to be renamed).

The meta object generator is updated to support both the old and new
names. That means some references to com.trolltech *must* remain in the
source code.

Task-number: QTBUG-23274
Change-Id: Icc38ae040232f07c437e7546ee744a4703f41726
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
26 files changed:
dist/changes-5.0.0
src/dbus/qdbusinternalfilters.cpp
src/dbus/qdbusmetaobject.cpp
src/dbus/qdbusmisc.cpp
src/dbus/qdbusvirtualobject.cpp
src/dbus/qdbusxmlgenerator.cpp
tests/auto/dbus/qdbusabstractadaptor/qmyserver/qmyserver.cpp
tests/auto/dbus/qdbusabstractadaptor/tst_qdbusabstractadaptor.cpp
tests/auto/dbus/qdbusabstractinterface/interface.h
tests/auto/dbus/qdbusabstractinterface/org.qtproject.QtDBus.Pinger.xml [moved from tests/auto/dbus/qdbusabstractinterface/com.trolltech.QtDBus.Pinger.xml with 81% similarity]
tests/auto/dbus/qdbusabstractinterface/pinger.cpp
tests/auto/dbus/qdbusabstractinterface/pinger.h
tests/auto/dbus/qdbusabstractinterface/qdbusabstractinterface.pro
tests/auto/dbus/qdbusabstractinterface/qpinger/qpinger.cpp
tests/auto/dbus/qdbusabstractinterface/tst_qdbusabstractinterface.cpp
tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp
tests/auto/dbus/qdbuscontext/tst_qdbuscontext.cpp
tests/auto/dbus/qdbusinterface/myobject.h
tests/auto/dbus/qdbusinterface/qmyserver/qmyserver.cpp
tests/auto/dbus/qdbusinterface/tst_qdbusinterface.cpp
tests/auto/dbus/qdbusmarshall/qpong/qpong.cpp
tests/auto/dbus/qdbusmarshall/tst_qdbusmarshall.cpp
tests/auto/dbus/qdbusmetaobject/tst_qdbusmetaobject.cpp
tests/auto/dbus/qdbuspendingcall/tst_qdbuspendingcall.cpp
tests/auto/dbus/qdbuspendingreply/tst_qdbuspendingreply.cpp
tests/auto/dbus/qdbusreply/tst_qdbusreply.cpp

index f8a553a..d3ea3fb 100644 (file)
@@ -423,6 +423,14 @@ QtNetwork
 * The openssl network backend now reads the ssl configuration file allowing
   the use of openssl engines.
 
+QtDBus
+------
+* QtDBus now generates property annotations for the Qt type names
+  in the org.qtproject.QtDBus namespace. When parsing such annotations
+  both the old and new namespaces are accepted.
+
+* QtDBus error codes have been updated to be on the org.qtproject.QtDBus.Error
+  namespace.
 
 QtOpenGL
 --------
index de1191a..28d43c8 100644 (file)
@@ -88,7 +88,7 @@ static const char propertiesInterfaceXml[] =
     "    <method name=\"GetAll\">\n"
     "      <arg name=\"interface_name\" type=\"s\" direction=\"in\"/>\n"
     "      <arg name=\"values\" type=\"a{sv}\" direction=\"out\"/>\n"
-    "      <annotation name=\"com.trolltech.QtDBus.QtTypeName.Out0\" value=\"QVariantMap\"/>\n"
+    "      <annotation name=\"org.qtproject.QtDBus.QtTypeName.Out0\" value=\"QVariantMap\"/>\n"
     "    </method>\n"
     "  </interface>\n";
 
index a6e5f96..4fbf67a 100644 (file)
@@ -165,7 +165,7 @@ QDBusMetaObjectGenerator::findType(const QByteArray &signature,
     if (type == QVariant::Invalid && !qt_dbus_metaobject_skip_annotations) {
         // it's not a type normally handled by our meta type system
         // it must contain an annotation
-        QString annotationName = QString::fromLatin1("com.trolltech.QtDBus.QtTypeName");
+        QString annotationName = QString::fromLatin1("org.qtproject.QtDBus.QtTypeName");
         if (id >= 0)
             annotationName += QString::fromLatin1(".%1%2")
                               .arg(QLatin1String(direction))
@@ -175,6 +175,16 @@ QDBusMetaObjectGenerator::findType(const QByteArray &signature,
         QByteArray typeName = annotations.value(annotationName).toLatin1();
 
         // verify that it's a valid one
+        if (typeName.isEmpty()) {
+            // try the old annotation from Qt 4
+            annotationName = QString::fromLatin1("com.trolltech.QtDBus.QtTypeName");
+            if (id >= 0)
+                annotationName += QString::fromLatin1(".%1%2")
+                                  .arg(QLatin1String(direction))
+                                  .arg(id);
+            typeName = annotations.value(annotationName).toLatin1();
+        }
+
         if (!typeName.isEmpty()) {
             // type name found
             type = QMetaType::type(typeName);
index 30f2adc..d92349b 100644 (file)
@@ -86,11 +86,11 @@ QString qDBusInterfaceFromMetaObject(const QMetaObject *mo)
         interface.replace(QLatin1String("::"), QLatin1String("."));
 
         if (interface.startsWith(QLatin1String("QDBus"))) {
-            interface.prepend(QLatin1String("com.trolltech.QtDBus."));
+            interface.prepend(QLatin1String("org.qtproject.QtDBus."));
         } else if (interface.startsWith(QLatin1Char('Q')) &&
                    interface.length() >= 2 && interface.at(1).isUpper()) {
             // assume it's Qt
-            interface.prepend(QLatin1String("com.trolltech.Qt."));
+            interface.prepend(QLatin1String("org.qtproject.Qt."));
         } else if (!QCoreApplication::instance()||
                    QCoreApplication::instance()->applicationName().isEmpty()) {
             interface.prepend(QLatin1String("local."));
index 7325bc1..a56a60f 100644 (file)
@@ -85,7 +85,7 @@ QT_END_NAMESPACE
     virtual object. It must return xml of the form:
 
     \code
-<interface name="com.trolltech.QtDBus.MyObject" >
+<interface name="org.qtproject.QtDBus.MyObject" >
     <property access="readwrite" type="i" name="prop1" />
 </interface>
     \endcode
index d97258d..4ad8113 100644 (file)
@@ -115,7 +115,7 @@ static QString generateInterfaceXml(const QMetaObject *mo, int flags, int method
 
             if (QDBusMetaType::signatureToType(signature) == QVariant::Invalid) {
                 const char *typeName = QVariant::typeToName(QVariant::Type(typeId));
-                retval += QString::fromLatin1(">\n      <annotation name=\"com.trolltech.QtDBus.QtTypeName\" value=\"%3\"/>\n    </property>\n")
+                retval += QString::fromLatin1(">\n      <annotation name=\"org.qtproject.QtDBus.QtTypeName\" value=\"%3\"/>\n    </property>\n")
                           .arg(typeNameToXml(typeName));
             } else {
                 retval += QLatin1String("/>\n");
@@ -157,7 +157,7 @@ static QString generateInterfaceXml(const QMetaObject *mo, int flags, int method
 
                 // do we need to describe this argument?
                 if (QDBusMetaType::signatureToType(typeName) == QVariant::Invalid)
-                    xml += QString::fromLatin1("      <annotation name=\"com.trolltech.QtDBus.QtTypeName.Out0\" value=\"%1\"/>\n")
+                    xml += QString::fromLatin1("      <annotation name=\"org.qtproject.QtDBus.QtTypeName.Out0\" value=\"%1\"/>\n")
                         .arg(typeNameToXml(QVariant::typeToName(QVariant::Type(typeId))));
             } else
                 continue;
@@ -201,7 +201,7 @@ static QString generateInterfaceXml(const QMetaObject *mo, int flags, int method
             // do we need to describe this argument?
             if (QDBusMetaType::signatureToType(signature) == QVariant::Invalid) {
                 const char *typeName = QVariant::typeToName( QVariant::Type(types.at(j)) );
-                xml += QString::fromLatin1("      <annotation name=\"com.trolltech.QtDBus.QtTypeName.%1%2\" value=\"%3\"/>\n")
+                xml += QString::fromLatin1("      <annotation name=\"org.qtproject.QtDBus.QtTypeName.%1%2\" value=\"%3\"/>\n")
                        .arg(isOutput ? QLatin1String("Out") : QLatin1String("In"))
                        .arg(isOutput && !isSignal ? j - inputCount : j - 1)
                        .arg(typeNameToXml(typeName));
@@ -264,11 +264,11 @@ QString qDBusGenerateMetaObjectXml(QString interface, const QMetaObject *mo, con
             interface.replace(QLatin1String("::"), QLatin1String("."));
 
             if (interface.startsWith(QLatin1String("QDBus"))) {
-                interface.prepend(QLatin1String("com.trolltech.QtDBus."));
+                interface.prepend(QLatin1String("org.qtproject.QtDBus."));
             } else if (interface.startsWith(QLatin1Char('Q')) &&
                        interface.length() >= 2 && interface.at(1).isUpper()) {
                 // assume it's Qt
-                interface.prepend(QLatin1String("com.trolltech.Qt."));
+                interface.prepend(QLatin1String("org.qtproject.Qt."));
             } else if (!QCoreApplication::instance()||
                        QCoreApplication::instance()->applicationName().isEmpty()) {
                 interface.prepend(QLatin1String("local."));
index d5d5f2c..39e6633 100644 (file)
@@ -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)
index c14d77e..30571fa 100644 (file)
@@ -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
index 2bd99fa..94addb7 100644 (file)
@@ -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)
@@ -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"/>
index 93d4732..a931f41 100644 (file)
@@ -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).
  *
index eb05d75..7fc6e64 100644 (file)
@@ -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).
  *
 #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);
index 9d8d542..623b07f 100644 (file)
@@ -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
index 87c6bad..3ecc839 100644 (file)
 #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),
index 7ac5cd3..59ec295 100644 (file)
@@ -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");
 
index 65b68b7..f99220e 100644 (file)
@@ -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
index bc06f8e..3ec9e63 100644 (file)
 #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:
index 94e7b3d..12c8da6 100644 (file)
@@ -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&lt;int&gt;\"/>\n"
+"      <annotation name=\"org.qtproject.QtDBus.QtTypeName\" value=\"QList&lt;int&gt;\"/>\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&lt;int&gt;\"/>\n"
-"      <annotation name=\"com.trolltech.QtDBus.QtTypeName.Out0\" value=\"QList&lt;int&gt;\"/>\n"
+"      <annotation name=\"org.qtproject.QtDBus.QtTypeName.In0\" value=\"QList&lt;int&gt;\"/>\n"
+"      <annotation name=\"org.qtproject.QtDBus.QtTypeName.Out0\" value=\"QList&lt;int&gt;\"/>\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&lt;int&gt;\"/>\n"
-"      <annotation name=\"com.trolltech.QtDBus.QtTypeName.Out0\" value=\"QList&lt;int&gt;\"/>\n"
+"      <annotation name=\"org.qtproject.QtDBus.QtTypeName.In0\" value=\"QList&lt;int&gt;\"/>\n"
+"      <annotation name=\"org.qtproject.QtDBus.QtTypeName.Out0\" value=\"QList&lt;int&gt;\"/>\n"
 "    </method>\n"
 "  </interface>\n"
         "")
index 1815a6e..cb3cd1b 100644 (file)
@@ -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)
index c866c9d..af2355a 100644 (file)
 #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=") ));
 }
index 39779c1..564b82a 100644 (file)
 #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)
index 57d7f82..8412fb8 100644 (file)
@@ -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
@@ -925,7 +925,7 @@ 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()
             << "org.qtproject.QtDBus.Error.InvalidService"
index a523a66..b459fdc 100644 (file)
@@ -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()
@@ -671,7 +676,7 @@ 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
index 60a8061..eca3524 100644 (file)
 #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)
index 865c9a8..6d5bdf7 100644 (file)
@@ -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);
 }
index b6026f2..a5ccd24 100644 (file)
@@ -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);
 }