forked from qt-creator/qt-creator
QmlDesigner: Add ModelNode::isSubclassOf
Change-Id: Icd1b0fcb19a0e15279b68059efa6aa251ce806a0 Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
This commit is contained in:
@@ -193,6 +193,7 @@ public:
|
|||||||
NodeSourceType nodeSourceType() const;
|
NodeSourceType nodeSourceType() const;
|
||||||
|
|
||||||
bool isComponent() const;
|
bool isComponent() const;
|
||||||
|
bool isSubclassOf(const TypeName &typeName, int majorVersion = -1, int minorVersion = -1) const;
|
||||||
|
|
||||||
private: // functions
|
private: // functions
|
||||||
Internal::InternalNodePointer internalNode() const;
|
Internal::InternalNodePointer internalNode() const;
|
||||||
|
@@ -1072,4 +1072,12 @@ bool ModelNode::isComponent() const
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ModelNode::isSubclassOf(const TypeName &typeName, int majorVersion, int minorVersion) const
|
||||||
|
{
|
||||||
|
if (metaInfo().isValid())
|
||||||
|
return metaInfo().isSubclassOf(typeName, majorVersion, minorVersion);
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user