From b2ca127ec42c541a00973cafe8333c187d1fcb5c Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Tue, 8 Sep 2015 10:45:57 +0200 Subject: qdoc: Allow linking to QML signals with their proper name Trying to link to QML signal documentation failed when the link string ends in parentheses: \l someSignal() This commit fixes the issue by adding QML signals into the list of primary functions, making it thereby available for findFunctionNode() method. Change-Id: Ib5a8325cd18171cdea392bcc1af676efe373f433 Task-number: QTBUG-48158 Reviewed-by: Martin Smith --- src/tools/qdoc/node.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/tools/qdoc/node.cpp b/src/tools/qdoc/node.cpp index 1fe0af352d..eec08e3c72 100644 --- a/src/tools/qdoc/node.cpp +++ b/src/tools/qdoc/node.cpp @@ -1189,7 +1189,9 @@ bool Aggregate::isSameSignature(const FunctionNode *f1, const FunctionNode *f2) void Aggregate::addChild(Node *child) { children_.append(child); - if ((child->type() == Function) || (child->type() == QmlMethod)) { + if (child->type() == Function + || child->type() == QmlMethod + || child->type() == QmlSignal) { FunctionNode *func = static_cast(child); QString name = func->name(); if (!primaryFunctionMap_.contains(name)) { @@ -1234,7 +1236,9 @@ void Aggregate::removeChild(Node *child) { children_.removeAll(child); enumChildren_.removeAll(child); - if (child->type() == Function) { + if (child->type() == Function + || child->type() == QmlMethod + || child->type() == QmlSignal) { QMap::Iterator primary = primaryFunctionMap_.find(child->name()); NodeList& overloads = secondaryFunctionMap_[child->name()]; if (primary != primaryFunctionMap_.end() && *primary == child) { -- cgit v1.2.3