QmlDesigner: Properly convert <cpp> types

This is something that requires a close look when we update the
meta system.

Task-number: QDS-4407
Change-Id: Ibb2bc79142bd4ae166c47ac261a3fe2aa5464a57
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
This commit is contained in:
Thomas Hartmann
2021-05-28 11:17:59 +02:00
parent 0f64c88510
commit de2e106475

View File

@@ -1543,6 +1543,12 @@ QVariant NodeMetaInfo::propertyCastedValue(const PropertyName &propertyName, con
} else if (typeName == "alias") {
// TODO: The QML compiler resolves the alias type. We probably should do the same.
return variant;
} else if (typeName == "<cpp>.double") {
return variant.toDouble();
} else if (typeName == "<cpp>.float") {
return variant.toFloat();
} else if (typeName == "<cpp>.int") {
return variant.toInt();
} else if (copyVariant.convert(typeId)) {
return copyVariant;
}