Commit a2fee4c6 authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.NodeMetainfo: adding defaultPropertyIsComponent()



This can be used to check if reparenting makes sense.

Change-Id: Ide1146841be76d8979dc452954fc6965ecdfef3d
Reviewed-by: default avatarMarco Bubke <marco.bubke@digia.com>
parent 9e58ab2a
......@@ -86,6 +86,8 @@ public:
QList<NodeMetaInfo> superClasses() const;
NodeMetaInfo directSuperClass() const;
bool defaultPropertyIsComponent() const;
TypeName typeName() const;
int majorVersion() const;
int minorVersion() const;
......
......@@ -1221,6 +1221,14 @@ NodeMetaInfo NodeMetaInfo::directSuperClass() const
return NodeMetaInfo();
}
bool NodeMetaInfo::defaultPropertyIsComponent() const
{
if (hasDefaultProperty())
return propertyTypeName(defaultPropertyName()) == "Component";
return false;
}
TypeName NodeMetaInfo::typeName() const
{
return m_privateData->qualfiedTypeName();
......
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