Commit 300f90f1 authored by Kai Koehne's avatar Kai Koehne

Revert "QmlDesigner: Remove 'variant' as qml type"

Actually it's 'variant' now, not 'var' any more

Reviewed-by: Thomas Hartmann
parent 5650dbc5
......@@ -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.
......
......@@ -148,7 +148,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;
......
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