summaryrefslogtreecommitdiffstats
path: root/tools/qdoc3/tree.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/qdoc3/tree.cpp')
-rw-r--r--tools/qdoc3/tree.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/tools/qdoc3/tree.cpp b/tools/qdoc3/tree.cpp
index d3de46c..70b998f 100644
--- a/tools/qdoc3/tree.cpp
+++ b/tools/qdoc3/tree.cpp
@@ -134,15 +134,16 @@ Node *Tree::findNode(const QStringList &path, Node *relative, int findFlags)
/*!
*/
-const Node *Tree::findNode(const QStringList &path,
- const Node *relative,
+const Node* Tree::findNode(const QStringList &path,
+ const Node* start,
int findFlags) const
{
- if (!relative)
- relative = root();
+ const Node* current = start;
+ if (!current)
+ current = root();
do {
- const Node *node = relative;
+ const Node *node = current;
int i;
for (i = 0; i < path.size(); ++i) {
@@ -171,10 +172,10 @@ const Node *Tree::findNode(const QStringList &path,
if (node && i == path.size()
&& (!(findFlags & NonFunction) || node->type() != Node::Function
|| ((FunctionNode *)node)->metaness() == FunctionNode::MacroWithoutParams))
- if (node->subType() != Node::QmlPropertyGroup)
+ if ((node != start) && (node->subType() != Node::QmlPropertyGroup))
return node;
- relative = relative->parent();
- } while (relative);
+ current = current->parent();
+ } while (current);
return 0;
}