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
......@@ -420,14 +420,12 @@ 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" || type() == "variant") {
} else if (type() == "var") {
return variant;
} else if (type() == "alias") {
// 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)
return QMetaType::type("QString");
else if (typeName == QLatin1String("url"))
return QMetaType::type("QUrl");
else if (typeName == QLatin1String("var") || typeName == QLatin1String("variant"))
else if (typeName == QLatin1String("var"))
return QMetaType::type("QVariant");
else
return -1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment