Code cleanup, remove QVariant::nameToType usage.
authorJędrzej Nowacki <jedrzej.nowacki@nokia.com>
Fri, 27 Jan 2012 13:06:53 +0000 (14:06 +0100)
committerQt by Nokia <qt-info@nokia.com>
Sat, 28 Jan 2012 13:44:48 +0000 (14:44 +0100)
It is better to use QMetaType::type  because it works well with custom
types too.

Change-Id: I30bc70d16b2aad4ba22682de1c215b917e64209b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
src/dbus/qdbusmetaobject.cpp

index dfb2b21..6acaa92 100644 (file)
@@ -202,9 +202,7 @@ QDBusMetaObjectGenerator::findType(const QByteArray &signature,
         // verify that it's a valid one
         if (!typeName.isEmpty()) {
             // type name found
-            type = QVariant::nameToType(typeName);
-            if (type == QVariant::UserType)
-                type = QMetaType::type(typeName);
+            type = QMetaType::type(typeName);
         }
 
         if (type == QVariant::Invalid || signature != QDBusMetaType::typeToSignature(type)) {