From a21ac7e75730bb094b49e5b58698a2ceebe8d73e Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Thu, 11 Mar 2010 09:13:54 +0100 Subject: 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. --- src/declarative/util/qdeclarativeanimation.cpp | 4 ++-- tools/qdoc3/htmlgenerator.cpp | 6 ++++-- tools/qdoc3/node.cpp | 17 +++++++++++++++++ tools/qdoc3/tree.cpp | 2 ++ 4 files changed, 25 insertions(+), 4 deletions(-) diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp index 20449d7..81c548b 100644 --- a/src/declarative/util/qdeclarativeanimation.cpp +++ b/src/declarative/util/qdeclarativeanimation.cpp @@ -2131,10 +2131,10 @@ void QDeclarativePropertyAnimation::setProperties(const QString &prop) } /*! - \qmlproperty string PropertyAnimation::property \qmlproperty string PropertyAnimation::properties - \qmlproperty Object PropertyAnimation::target \qmlproperty list PropertyAnimation::targets + \qmlproperty string PropertyAnimation::property + \qmlproperty Object PropertyAnimation::target These properties are used as a set to determine which properties should be animated. The singular and plural forms are functionally identical, e.g. diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 411a886..f8fb5b2 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -3991,10 +3991,12 @@ QString HtmlGenerator::getLink(const Atom *atom, } else { *node = marker->resolveTarget(first, myTree, relative); - if (!*node) + if (!*node) { *node = myTree->findFakeNodeByTitle(first); - if (!*node) + } + if (!*node) { *node = myTree->findUnambiguousTarget(first, targetAtom); + } } if (*node) { 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; isubType() == QmlPropertyGroup) { + node = static_cast(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) { diff --git a/tools/qdoc3/tree.cpp b/tools/qdoc3/tree.cpp index 922c23e..7dcc8c3 100644 --- a/tools/qdoc3/tree.cpp +++ b/tools/qdoc3/tree.cpp @@ -54,6 +54,7 @@ #include "tree.h" #include +#include QT_BEGIN_NAMESPACE @@ -150,6 +151,7 @@ const Node *Tree::findNode(const QStringList &path, const Node *next = static_cast(node)->findNode(path.at(i)); + if (!next && (findFlags & SearchEnumValues) && i == path.size()-1) next = static_cast(node)->findEnumNodeForValue(path.at(i)); -- cgit v0.12