summaryrefslogtreecommitdiffstats
path: root/src/tools/qdoc/qmlvisitor.cpp
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@digia.com>2015-05-22 13:59:13 +0200
committerMartin Smith <martin.smith@digia.com>2015-06-10 12:46:53 +0000
commit9b58fe5c264cabe6912bb4fb7b045c2aecd98cb7 (patch)
tree81dc58aae68d25f9ecc966bf99ea2ce2569b9a94 /src/tools/qdoc/qmlvisitor.cpp
parent0ec550c748748fcc94008bc2555482bd614251dc (diff)
qdoc: Related non-members are now linked correctly
It was harder to fix this tan you might think, but the fix cleans up the overload mechanism a lot, so if no regressions are introduced by the fix, the code will be easier to manage. The related non-members are now added to the class node's list of secondary (overload) functions. This way, they get an overload number just like overloaded member functions. Change-Id: I68d7a314b0bb5ec0fbba15dc1fd40a5b870c659d Task-number: QTBUG-46148 Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com> Reviewed-by: Topi Reiniƶ <topi.reinio@digia.com>
Diffstat (limited to 'src/tools/qdoc/qmlvisitor.cpp')
-rw-r--r--src/tools/qdoc/qmlvisitor.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tools/qdoc/qmlvisitor.cpp b/src/tools/qdoc/qmlvisitor.cpp
index 360af5adf6..a2091f44b5 100644
--- a/src/tools/qdoc/qmlvisitor.cpp
+++ b/src/tools/qdoc/qmlvisitor.cpp
@@ -752,14 +752,14 @@ bool QmlDocVisitor::visit(QQmlJS::AST::FunctionDeclaration* fd)
if (current->isJsType())
qmlMethod->setGenus(Node::JS);
int overloads = 0;
- NodeList::ConstIterator overloadIterator = current->childNodes().constBegin();
- while (overloadIterator != current->childNodes().constEnd()) {
- if ((*overloadIterator)->name() == name)
+ NodeList::ConstIterator i = current->childNodes().constBegin();
+ while (i != current->childNodes().constEnd()) {
+ if ((*i)->name() == name)
overloads++;
- overloadIterator++;
+ i++;
}
if (overloads > 1)
- qmlMethod->setOverload(true);
+ qmlMethod->setOverloadFlag(true);
QList<Parameter> parameters;
QQmlJS::AST::FormalParameterList* formals = fd->formals;
if (formals) {