QmlDesigner: Fix issue with list properties

On pure QML types list properties were reported as list properties.

Task-number: QDS-687
Change-Id: I34b1688953185b65d64c299c72c8170d7daa789b
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Thomas Hartmann
2019-05-24 16:13:43 +02:00
parent a7df038106
commit 168e91b618

View File

@@ -870,6 +870,12 @@ bool NodeMetaInfoPrivate::isPropertyList(const PropertyName &propertyName) const
const CppComponentValue *qmlObjectValue = getNearestCppComponentValue();
if (!qmlObjectValue)
return false;
if (!qmlObjectValue->hasProperty(QString::fromUtf8(propertyName))) {
const TypeName typeName = propertyType(propertyName);
return (typeName == "Item" || typeName == "QtObject");
}
return qmlObjectValue->isListProperty(QString::fromUtf8(propertyName));
}