Code cleanup, remove QVariant::nameToType usage.

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>
This commit is contained in:
Jędrzej Nowacki 2012-01-27 14:06:53 +01:00 committed by Qt by Nokia
parent 1fee3304fd
commit 7c853db642

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