Commit 673b1c2c authored by Tim Jenssen's avatar Tim Jenssen

QmlDesigner: do not call converToVariant on ListElements

Change-Id: I52c3e6ad8efe6e3907496993307da42c9e2482f4
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent 076bc144
......@@ -247,6 +247,11 @@ static inline QVariant convertDynamicPropertyValueToVariant(const QString &astVa
}
}
static bool isListElementType(const QmlDesigner::TypeName &type)
{
return type == "ListElement" || type == "QtQuick.ListElement" || type == "Qt.ListElement";
}
static bool isComponentType(const QmlDesigner::TypeName &type)
{
return type == "Component" || type == "Qt.Component" || type == "QtQuick.Component" || type == "<cpp>.QQmlComponent";
......@@ -1225,7 +1230,8 @@ QmlDesigner::PropertyName TextToModelMerger::syncScriptBinding(ModelNode &modelN
if (isLiteralValue(script)) {
if (isPropertyChangesType(modelNode.type())
|| isConnectionsType(modelNode.type())) {
|| isConnectionsType(modelNode.type())
|| isListElementType(modelNode.type())) {
AbstractProperty modelProperty = modelNode.property(astPropertyName.toUtf8());
QVariant variantValue = parsePropertyScriptBinding(script);
if (!variantValue.isValid())
......
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