Skip to content
Snippets Groups Projects
Commit 107ad1ca authored by Kai Koehne's avatar Kai Koehne
Browse files

QmlDesigner: Remove 'variant' as qml type

'variant' has been removed from the qml grammar: d1f019567, it's now 'var' only.
parent 8faae581
No related branches found
No related tags found
No related merge requests found
...@@ -420,14 +420,12 @@ QVariant PropertyMetaInfo::castedValue(const QVariant &originalVariant) const ...@@ -420,14 +420,12 @@ QVariant PropertyMetaInfo::castedValue(const QVariant &originalVariant) const
return variant; return variant;
} else if (typeId == QVariant::UserType && m_data->type == QLatin1String("QVariant")) { } else if (typeId == QVariant::UserType && m_data->type == QLatin1String("QVariant")) {
return variant; return variant;
} else if (typeId == QVariant::UserType && m_data->type == QLatin1String("variant")) {
return variant;
} else if (typeId == QVariant::UserType && m_data->type == QLatin1String("var")) { } else if (typeId == QVariant::UserType && m_data->type == QLatin1String("var")) {
return variant; return variant;
} else if (variant.type() == QVariant::List && variant.type() == QVariant::List) { } else if (variant.type() == QVariant::List && variant.type() == QVariant::List) {
// TODO: check the contents of the list // TODO: check the contents of the list
return variant; return variant;
} else if (type() == "var" || type() == "variant") { } else if (type() == "var") {
return variant; return variant;
} else if (type() == "alias") { } else if (type() == "alias") {
// TODO: The QML compiler resolves the alias type. We probably should do the same. // TODO: The QML compiler resolves the alias type. We probably should do the same.
......
...@@ -185,7 +185,7 @@ static inline int propertyType(const QString &typeName) ...@@ -185,7 +185,7 @@ static inline int propertyType(const QString &typeName)
return QMetaType::type("QString"); return QMetaType::type("QString");
else if (typeName == QLatin1String("url")) else if (typeName == QLatin1String("url"))
return QMetaType::type("QUrl"); return QMetaType::type("QUrl");
else if (typeName == QLatin1String("var") || typeName == QLatin1String("variant")) else if (typeName == QLatin1String("var"))
return QMetaType::type("QVariant"); return QMetaType::type("QVariant");
else else
return -1; return -1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment