Simplify a type name query.
authorJędrzej Nowacki <jedrzej.nowacki@nokia.com>
Fri, 18 May 2012 15:21:09 +0000 (17:21 +0200)
committerQt by Nokia <qt-info@nokia.com>
Mon, 21 May 2012 13:55:04 +0000 (15:55 +0200)
QVariant::typeToName is calling QMetaType::typeName and returns the same
data.

Change-Id: I4028f54ef318292e27eaa0e6981ea114e6e6cd52
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
src/qml/qml/qqmlcompiler.cpp

index 47a5672..c3d134f 100644 (file)
@@ -400,7 +400,7 @@ bool QQmlCompiler::testLiteralAssignment(QQmlScript::Property *prop,
             // otherwise, check for existence of string converter to custom type
             QQmlMetaType::StringConverter converter = QQmlMetaType::customStringConverter(type);
             if (!converter)
-                COMPILE_EXCEPTION(v, tr("Invalid property assignment: unsupported type \"%1\"").arg(QString::fromLatin1(QVariant::typeToName((QVariant::Type)type))));
+                COMPILE_EXCEPTION(v, tr("Invalid property assignment: unsupported type \"%1\"").arg(QString::fromLatin1(QMetaType::typeName(type))));
             }
             break;
     }