Finish cleaning up com.trolltech -> org.qtproject in QtDBus

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>
bb10
Thiago Macieira 2012-03-29 11:11:03 -03:00 committed by Qt by Nokia
parent 65e75acd05
commit e02a144a3c
26 changed files with 99 additions and 76 deletions

8
dist/changes-5.0.0 vendored
View 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
--------

View 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";

View 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);

View 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."));

View 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

View 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."));

View 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)

View 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

View 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)

View File

@ -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"/>

View 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).
*

View 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).
*
@ -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);

View 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

View File

@ -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),

View 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");

View 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

View File

@ -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:

View 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"
"")

View 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)

View File

@ -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=") ));
}

View File

@ -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)

View 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"

View 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
{
@ -340,9 +340,13 @@ signals:
void signal(QVariantMap);
};
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

View File

@ -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)

View 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);
}

View 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);
}