summaryrefslogtreecommitdiffstats
path: root/src/dbus/qdbusmetaobject.cpp
diff options
context:
space:
mode:
authorFabien Freling <fabien.freling@nokia.com>2011-03-15 14:09:06 (GMT)
committerFabien Freling <fabien.freling@nokia.com>2011-03-15 14:09:06 (GMT)
commitb36f947147e3f5acf444c94d6e2a608506b7e753 (patch)
treea0bf253b8e315305cfada01871f3a1cbf54aef43 /src/dbus/qdbusmetaobject.cpp
parentd524e983c60ba59f3c65d811ec92f02c97d1a8ab (diff)
parentc0cd8db0498daaa8151d1f80143b6849016bdc7c (diff)
downloadQt-b36f947147e3f5acf444c94d6e2a608506b7e753.zip
Qt-b36f947147e3f5acf444c94d6e2a608506b7e753.tar.gz
Qt-b36f947147e3f5acf444c94d6e2a608506b7e753.tar.bz2
Merge remote branch 'mainline/master' into merge_raster
Diffstat (limited to 'src/dbus/qdbusmetaobject.cpp')
-rw-r--r--src/dbus/qdbusmetaobject.cpp21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/dbus/qdbusmetaobject.cpp b/src/dbus/qdbusmetaobject.cpp
index 6683505..df8bc1d 100644
--- a/src/dbus/qdbusmetaobject.cpp
+++ b/src/dbus/qdbusmetaobject.cpp
@@ -193,14 +193,19 @@ QDBusMetaObjectGenerator::findType(const QByteArray &signature,
QByteArray typeName = annotations.value(annotationName).toLatin1();
// verify that it's a valid one
- if (typeName.isEmpty())
- return result; // invalid
-
- type = QVariant::nameToType(typeName);
- if (type == QVariant::UserType)
- type = QMetaType::type(typeName);
- if (type == QVariant::Invalid || signature != QDBusMetaType::typeToSignature(type))
- return result; // unknown type is invalid too
+ if (!typeName.isEmpty()) {
+ // type name found
+ type = QVariant::nameToType(typeName);
+ if (type == QVariant::UserType)
+ type = QMetaType::type(typeName);
+ }
+
+ if (type == QVariant::Invalid || signature != QDBusMetaType::typeToSignature(type)) {
+ // type is still unknown or doesn't match back to the signature that it
+ // was expected to, so synthesize a fake type
+ type = QMetaType::VoidStar;
+ typeName = "QDBusRawType<0x" + signature.toHex() + ">*";
+ }
result.name = typeName;
} else if (type == QVariant::Invalid) {