Commit c060d778 authored by Thomas Hartmann's avatar Thomas Hartmann

QmlDesigner.model: fix majorQtQuickVersion()

This function was broken for Item.

Change-Id: I772a2fd1b63933ba1134c824eb245b78d0270d9d
Reviewed-by: default avatarMarco Bubke <marco.bubke@digia.com>
parent 3c5b64a7
......@@ -249,10 +249,12 @@ int ModelNode::majorQtQuickVersion() const
}
if (metaInfo().isValid()) {
if (type() == "QtQuick.QtObject")
return majorVersion();
NodeMetaInfo superClass = metaInfo().directSuperClass();
while (superClass.isValid()) {
if (superClass.typeName() == "QtQuick.Item")
if (superClass.typeName() == "QtQuick.QtObject")
return superClass.majorVersion();
superClass = superClass.directSuperClass();
}
......
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