From e02a144a3c8e7858d879ac2d0038bc7d00906ae6 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 29 Mar 2012 11:11:03 -0300 Subject: 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 Reviewed-by: Lorn Potter --- src/dbus/qdbusmetaobject.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/dbus/qdbusmetaobject.cpp') diff --git a/src/dbus/qdbusmetaobject.cpp b/src/dbus/qdbusmetaobject.cpp index a6e5f96eca..4fbf67a8b2 100644 --- a/src/dbus/qdbusmetaobject.cpp +++ b/src/dbus/qdbusmetaobject.cpp @@ -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); -- cgit v1.2.3