diff --git a/src/plugins/qmldesigner/core/metainfo/propertymetainfo.cpp b/src/plugins/qmldesigner/core/metainfo/propertymetainfo.cpp index 5047c3b7b64..9e84ae056cf 100644 --- a/src/plugins/qmldesigner/core/metainfo/propertymetainfo.cpp +++ b/src/plugins/qmldesigner/core/metainfo/propertymetainfo.cpp @@ -420,12 +420,14 @@ QVariant PropertyMetaInfo::castedValue(const QVariant &originalVariant) const return variant; } else if (typeId == QVariant::UserType && m_data->type == QLatin1String("QVariant")) { return variant; + } else if (typeId == QVariant::UserType && m_data->type == QLatin1String("variant")) { + return variant; } else if (typeId == QVariant::UserType && m_data->type == QLatin1String("var")) { return variant; } else if (variant.type() == QVariant::List && variant.type() == QVariant::List) { // TODO: check the contents of the list return variant; - } else if (type() == "var") { + } else if (type() == "var" || type() == "variant") { return variant; } else if (type() == "alias") { // TODO: The QML compiler resolves the alias type. We probably should do the same. diff --git a/src/plugins/qmldesigner/core/model/texttomodelmerger.cpp b/src/plugins/qmldesigner/core/model/texttomodelmerger.cpp index af77acafe8e..2d214e82512 100644 --- a/src/plugins/qmldesigner/core/model/texttomodelmerger.cpp +++ b/src/plugins/qmldesigner/core/model/texttomodelmerger.cpp @@ -185,7 +185,7 @@ static inline int propertyType(const QString &typeName) return QMetaType::type("QString"); else if (typeName == QLatin1String("url")) return QMetaType::type("QUrl"); - else if (typeName == QLatin1String("var")) + else if (typeName == QLatin1String("var") || typeName == QLatin1String("variant")) return QMetaType::type("QVariant"); else return -1;