From 8c5ce68fcf09d128072c31d74878fcb0fd9b9c7a Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Thu, 6 Aug 2015 13:47:44 +0200 Subject: qdoc: Allow formal parameters in link targets This update allows qdoc to handle \l commands for linking to functions, where the formal parameters are included in the link target. For example, \l {QWidget::find(QString name)} will only match a member function of QWidget that has a single parameter of type QString. The parameter name is not used in the search. Change-Id: I8a31c9a7ed632f12a0e6d8a33cbb5cd361098317 Task-number: QTBUG-47286 Reviewed-by: Martin Smith --- src/tools/qdoc/qmlvisitor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/tools/qdoc/qmlvisitor.cpp') diff --git a/src/tools/qdoc/qmlvisitor.cpp b/src/tools/qdoc/qmlvisitor.cpp index 6f63624bf0..155e1de054 100644 --- a/src/tools/qdoc/qmlvisitor.cpp +++ b/src/tools/qdoc/qmlvisitor.cpp @@ -675,7 +675,7 @@ bool QmlDocVisitor::visit(QQmlJS::AST::UiPublicMember *member) QString name = member->name.toString(); FunctionNode *qmlSignal = new FunctionNode(Node::QmlSignal, current, name, false); - QList parameters; + QVector parameters; for (QQmlJS::AST::UiParameterList *it = member->parameters; it; it = it->next) { if (!it->type.isEmpty() && !it->name.isEmpty()) parameters.append(Parameter(it->type.toString(), QString(), it->name.toString())); @@ -754,7 +754,7 @@ bool QmlDocVisitor::visit(QQmlJS::AST::FunctionDeclaration* fd) } if (overloads > 1) qmlMethod->setOverloadFlag(true); - QList parameters; + QVector parameters; QQmlJS::AST::FormalParameterList* formals = fd->formals; if (formals) { QQmlJS::AST::FormalParameterList* fpl = formals; -- cgit v1.2.3