diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2012-03-29 14:11:03 (GMT) |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-04-20 16:32:24 (GMT) |
commit | 2a392118dae5169de8a5b1eacfd02d02e5dda7be (patch) | |
tree | 750ac859b42e2636702c6014839764a8b6849910 /src | |
parent | 8599a0e6397391634ee52197e164f6b7121f9a4d (diff) | |
download | Qt-2a392118dae5169de8a5b1eacfd02d02e5dda7be.zip Qt-2a392118dae5169de8a5b1eacfd02d02e5dda7be.tar.gz Qt-2a392118dae5169de8a5b1eacfd02d02e5dda7be.tar.bz2 |
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>
(cherry-picked from commit e02a144a3c8e7858d879ac2d0038bc7d00906ae6)
Diffstat (limited to 'src')
-rw-r--r-- | src/dbus/qdbusinternalfilters.cpp | 2 | ||||
-rw-r--r-- | src/dbus/qdbusmetaobject.cpp | 12 | ||||
-rw-r--r-- | src/dbus/qdbusmisc.cpp | 4 | ||||
-rw-r--r-- | src/dbus/qdbusvirtualobject.cpp | 2 | ||||
-rw-r--r-- | src/dbus/qdbusxmlgenerator.cpp | 10 |
5 files changed, 20 insertions, 10 deletions
diff --git a/src/dbus/qdbusinternalfilters.cpp b/src/dbus/qdbusinternalfilters.cpp index 7d07c92..58f079b 100644 --- a/src/dbus/qdbusinternalfilters.cpp +++ b/src/dbus/qdbusinternalfilters.cpp @@ -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"; diff --git a/src/dbus/qdbusmetaobject.cpp b/src/dbus/qdbusmetaobject.cpp index 400ca3e..4dea325 100644 --- a/src/dbus/qdbusmetaobject.cpp +++ b/src/dbus/qdbusmetaobject.cpp @@ -183,7 +183,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)) @@ -193,6 +193,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 = QVariant::nameToType(typeName); diff --git a/src/dbus/qdbusmisc.cpp b/src/dbus/qdbusmisc.cpp index e7c7715..6103203 100644 --- a/src/dbus/qdbusmisc.cpp +++ b/src/dbus/qdbusmisc.cpp @@ -89,11 +89,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.")); diff --git a/src/dbus/qdbusvirtualobject.cpp b/src/dbus/qdbusvirtualobject.cpp index c421e7d..4dbfbec 100644 --- a/src/dbus/qdbusvirtualobject.cpp +++ b/src/dbus/qdbusvirtualobject.cpp @@ -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 diff --git a/src/dbus/qdbusxmlgenerator.cpp b/src/dbus/qdbusxmlgenerator.cpp index b49756e..f24e255 100644 --- a/src/dbus/qdbusxmlgenerator.cpp +++ b/src/dbus/qdbusxmlgenerator.cpp @@ -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"); @@ -159,7 +159,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; @@ -203,7 +203,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)); @@ -266,11 +266,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.")); |