summaryrefslogtreecommitdiffstats
path: root/src/tools/qdoc
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@digia.com>2015-09-08 10:45:57 +0200
committerTopi Reiniƶ <topi.reinio@digia.com>2015-09-11 08:40:30 +0000
commitb2ca127ec42c541a00973cafe8333c187d1fcb5c (patch)
treecc74fcfe2ecf3c60edff38c5c45b3269cae1f95b /src/tools/qdoc
parent91479d6a3043e823f263545867673d179d0ce237 (diff)
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 <martin.smith@digia.com>
Diffstat (limited to 'src/tools/qdoc')
-rw-r--r--src/tools/qdoc/node.cpp8
1 files 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<FunctionNode*>(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<QString, Node *>::Iterator primary = primaryFunctionMap_.find(child->name());
NodeList& overloads = secondaryFunctionMap_[child->name()];
if (primary != primaryFunctionMap_.end() && *primary == child) {