forked from qt-creator/qt-creator
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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user