forked from qt-creator/qt-creator
QmlDesigner: Add hasValidMetaInfo to ModelNode
Change-Id: Ifb00ad28dc72d4876b9dffbad70b18d6ada07004 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This commit is contained in:
@@ -158,6 +158,7 @@ public:
|
|||||||
AbstractView *view() const;
|
AbstractView *view() const;
|
||||||
|
|
||||||
const NodeMetaInfo metaInfo() const;
|
const NodeMetaInfo metaInfo() const;
|
||||||
|
bool hasMetaInfo() const;
|
||||||
|
|
||||||
bool isSelected() const;
|
bool isSelected() const;
|
||||||
bool isRootNode() const;
|
bool isRootNode() const;
|
||||||
|
@@ -785,6 +785,16 @@ const NodeMetaInfo ModelNode::metaInfo() const
|
|||||||
return NodeMetaInfo(model()->metaInfoProxyModel(), type(), majorVersion(), minorVersion());
|
return NodeMetaInfo(model()->metaInfoProxyModel(), type(), majorVersion(), minorVersion());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ModelNode::hasMetaInfo() const
|
||||||
|
{
|
||||||
|
if (!isValid()) {
|
||||||
|
Q_ASSERT_X(isValid(), Q_FUNC_INFO, "model node is invalid");
|
||||||
|
throw InvalidModelNodeException(__LINE__, __FUNCTION__, __FILE__);
|
||||||
|
}
|
||||||
|
|
||||||
|
return model()->hasNodeMetaInfo(type(), majorVersion(), minorVersion());
|
||||||
|
}
|
||||||
|
|
||||||
/*! \brief has a node the selection of the model
|
/*! \brief has a node the selection of the model
|
||||||
\return true if the node his selection
|
\return true if the node his selection
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user