summaryrefslogtreecommitdiffstats
path: root/tools/qdoc3/tree.cpp
diff options
context:
space:
mode:
authorMartin Smith <msmith@trolltech.com>2009-11-05 13:09:16 (GMT)
committerMartin Smith <msmith@trolltech.com>2009-11-05 13:10:22 (GMT)
commit4328004a78fedc33c09e352c2e7f7f9958952a16 (patch)
tree642a515580c746bac255ba92c27ff953dac722da /tools/qdoc3/tree.cpp
parent1ead772e1d4c80723f40ec4562c196e63197bfc0 (diff)
downloadQt-4328004a78fedc33c09e352c2e7f7f9958952a16.zip
Qt-4328004a78fedc33c09e352c2e7f7f9958952a16.tar.gz
Qt-4328004a78fedc33c09e352c2e7f7f9958952a16.tar.bz2
qdoc3: Fixed a linking problem for qml methods.
Note the Invalid Syntax errors for some uses of \qmlmethod and \qmlsignal. A syntactically correct signature is now required as the argument.
Diffstat (limited to 'tools/qdoc3/tree.cpp')
-rw-r--r--tools/qdoc3/tree.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/tools/qdoc3/tree.cpp b/tools/qdoc3/tree.cpp
index bcd9709..4d401de 100644
--- a/tools/qdoc3/tree.cpp
+++ b/tools/qdoc3/tree.cpp
@@ -225,6 +225,7 @@ const FunctionNode *Tree::findFunctionNode(const QStringList &path,
{
if (!relative)
relative = root();
+
do {
const Node *node = relative;
int i;
@@ -244,8 +245,7 @@ const FunctionNode *Tree::findFunctionNode(const QStringList &path,
NodeList baseClasses = allBaseClasses(static_cast<const ClassNode *>(node));
foreach (const Node *baseClass, baseClasses) {
if (i == path.size() - 1)
- next = static_cast<const InnerNode *>(baseClass)->
- findFunctionNode(path.at(i));
+ next = static_cast<const InnerNode *>(baseClass)->findFunctionNode(path.at(i));
else
next = static_cast<const InnerNode *>(baseClass)->findNode(path.at(i));
@@ -256,11 +256,10 @@ const FunctionNode *Tree::findFunctionNode(const QStringList &path,
node = next;
}
- if (node && i == path.size() && node->type() == Node::Function) {
+ if (node && i == path.size() && node->isFunction()) {
// CppCodeParser::processOtherMetaCommand ensures that reimplemented
// functions are private.
const FunctionNode *func = static_cast<const FunctionNode*>(node);
-
while (func->access() == Node::Private) {
const FunctionNode *from = func->reimplementedFrom();
if (from != 0) {
@@ -268,7 +267,8 @@ const FunctionNode *Tree::findFunctionNode(const QStringList &path,
return from;
else
func = from;
- } else
+ }
+ else
break;
}
return func;
@@ -303,7 +303,8 @@ const FunctionNode *Tree::findFunctionNode(const QStringList &parentPath,
const Node *parent = findNode(parentPath, relative, findFlags);
if (parent == 0 || !parent->isInnerNode()) {
return 0;
- } else {
+ }
+ else {
return ((InnerNode *)parent)->findFunctionNode(clone);
}
}