summaryrefslogtreecommitdiffstats
path: root/tools/qdoc3/node.cpp
diff options
context:
space:
mode:
authorMartin Smith <msmith@trolltech.com>2010-03-11 08:13:54 (GMT)
committerMartin Smith <msmith@trolltech.com>2010-03-11 08:13:54 (GMT)
commita21ac7e75730bb094b49e5b58698a2ceebe8d73e (patch)
tree0187f97f1f41a04ac98812843fb879fd93f869cf /tools/qdoc3/node.cpp
parent49bcf035d428d9d8bd2c4d546fc935e9d4ca0a2a (diff)
downloadQt-a21ac7e75730bb094b49e5b58698a2ceebe8d73e.zip
Qt-a21ac7e75730bb094b49e5b58698a2ceebe8d73e.tar.gz
Qt-a21ac7e75730bb094b49e5b58698a2ceebe8d73e.tar.bz2
qdoc: Fixed lookup of QML property nodes.
At this point, no QML qdoc errors appear in the output. There is still a lot of debug output.
Diffstat (limited to 'tools/qdoc3/node.cpp')
-rw-r--r--tools/qdoc3/node.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp
index d4e4196..896ce3f 100644
--- a/tools/qdoc3/node.cpp
+++ b/tools/qdoc3/node.cpp
@@ -207,16 +207,33 @@ InnerNode::~InnerNode()
}
/*!
+ Find the node in this node's children that has the
+ given \a name. If this node is a QML class node, be
+ sure to also look in the children of its property
+ group nodes. Return the matching node or 0.
*/
Node *InnerNode::findNode(const QString& name)
{
Node *node = childMap.value(name);
if (node)
return node;
+ if ((type() == Fake) && (subType() == QmlClass)) {
+ for (int i=0; i<children.size(); ++i) {
+ Node* n = children.at(i);
+ if (n->subType() == QmlPropertyGroup) {
+ node = static_cast<const InnerNode*>(n)->findNode(name);
+ if (node)
+ return node;
+ }
+ }
+ }
return primaryFunctionMap.value(name);
}
/*!
+ Same as the other findNode(), but if the node with the
+ specified \a name is not of the specified \a type, return
+ 0.
*/
Node *InnerNode::findNode(const QString& name, Type type)
{