summaryrefslogtreecommitdiffstats
path: root/tools/qdoc3/tree.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-07-06 13:44:42 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-07-06 13:44:42 (GMT)
commit7a2c04a3b198df42e69e9700f550f39aac319fd4 (patch)
treed1c92ed0cf8f0c894ad6b7a589d2946f815ccdd5 /tools/qdoc3/tree.cpp
parent1f6ca759736eaf8eee7df6bec657e9806602543b (diff)
parentfa9c62460791c9b9add365fc9543ec0392f50cee (diff)
downloadQt-7a2c04a3b198df42e69e9700f550f39aac319fd4.zip
Qt-7a2c04a3b198df42e69e9700f550f39aac319fd4.tar.gz
Qt-7a2c04a3b198df42e69e9700f550f39aac319fd4.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Adapt the TapAndHold recognizer to non-touch too add setNativeArguments() and nativeArguments() fix bogus return value from qprocess::execute() qdoc: Simplified code to enable fixing of QTBUG-6340. Doc: fixing img style
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;
}