summaryrefslogtreecommitdiffstats
path: root/tools/qdoc3/tree.cpp
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@nokia.com>2010-07-06 10:24:20 (GMT)
committerMartin Smith <martin.smith@nokia.com>2010-07-06 10:24:20 (GMT)
commit3b6c44f773d293f807784b775f352873c793e75a (patch)
treed6d8655179b3f74b73f4897007d1dc2983d9a8ac /tools/qdoc3/tree.cpp
parentf8906a729761203866b100f5cd74e452cc94c451 (diff)
downloadQt-3b6c44f773d293f807784b775f352873c793e75a.zip
Qt-3b6c44f773d293f807784b775f352873c793e75a.tar.gz
Qt-3b6c44f773d293f807784b775f352873c793e75a.tar.bz2
qdoc: Simplified code to enable fixing of QTBUG-6340.
Also reworded some of the text for QTBUG-11575. Task-number: QTBUG-6340, QTBUG-11575
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;
}