diff options
author | Martin Smith <msmith@trolltech.com> | 2010-03-11 08:13:54 (GMT) |
---|---|---|
committer | Martin Smith <msmith@trolltech.com> | 2010-03-11 08:13:54 (GMT) |
commit | a21ac7e75730bb094b49e5b58698a2ceebe8d73e (patch) | |
tree | 0187f97f1f41a04ac98812843fb879fd93f869cf | |
parent | 49bcf035d428d9d8bd2c4d546fc935e9d4ca0a2a (diff) | |
download | Qt-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.
-rw-r--r-- | src/declarative/util/qdeclarativeanimation.cpp | 4 | ||||
-rw-r--r-- | tools/qdoc3/htmlgenerator.cpp | 6 | ||||
-rw-r--r-- | tools/qdoc3/node.cpp | 17 | ||||
-rw-r--r-- | 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<Object> 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; 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) { 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 <limits.h> +#include <qdebug.h> QT_BEGIN_NAMESPACE @@ -150,6 +151,7 @@ const Node *Tree::findNode(const QStringList &path, const Node *next = static_cast<const InnerNode*>(node)->findNode(path.at(i)); + if (!next && (findFlags & SearchEnumValues) && i == path.size()-1) next = static_cast<const InnerNode*>(node)->findEnumNodeForValue(path.at(i)); |