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>
This commit is contained in:
Topi Reinio 2015-09-08 10:45:57 +02:00 committed by Topi Reiniö
parent 91479d6a30
commit b2ca127ec4

View File

@ -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) {