Commit 61b3569b authored by Marco Bubke's avatar Marco Bubke
Browse files

QmlDesigner: Add NavigatorTreeModel::hasNodeForIndex

Change-Id: Iffa392bdf2348c22319168a49aee9cd5bd3f6b2a
Reviewed-by: default avatarMarco Bubke <>
parent 84f1fcc7
......@@ -414,6 +414,17 @@ ModelNode NavigatorTreeModel::nodeForIndex(const QModelIndex &index) const
return m_view->modelNodeForInternalId(internalId);
bool NavigatorTreeModel::hasNodeForIndex(const QModelIndex &index) const
QVariant internalIdVaraint =;
if (internalIdVaraint.isValid()) {
qint32 internalId = internalIdVaraint.toInt();
return m_view->hasModelNodeForInternalId(internalId);
return false;
bool NavigatorTreeModel::isInTree(const ModelNode &node) const
return m_nodeItemHash.contains(node);
......@@ -102,6 +102,7 @@ public:
QModelIndex indexForNode(const ModelNode &node) const;
ModelNode nodeForIndex(const QModelIndex &index) const;
bool hasNodeForIndex(const QModelIndex &index) const;
bool isInTree(const ModelNode &node) const;
bool isNodeInvisible(const QModelIndex &index) const;
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