diff options
author | Topi Reinio <topi.reinio@qt.io> | 2019-04-15 22:37:08 +0200 |
---|---|---|
committer | Topi Reiniƶ <topi.reinio@qt.io> | 2019-04-16 08:25:04 +0000 |
commit | 1562cf0d6129886e16c57ac72fab00b309db6bc6 (patch) | |
tree | 2c1f345893851effa68a3436908b28e7b95b3674 | |
parent | d92b976f7d092a31c67edc2c515ac2444cd2808d (diff) |
qdoc: Allow QML/JS types with the same name as the parent modulev5.13.0-beta3
QtMultimedia QML module contains a QML type QtMultimedia. QDoc
was overriding one with the other because the search function
returns both types of nodes (as they have the same genus, 'QML').
Fix this by checking that we actually found an existing type, not
a module.
Task-number: QTBUG-75186
Change-Id: Id7a151d6db137fd337e4dd68ebe7c8aa08ed80e0
Reviewed-by: Martin Smith <martin.smith@qt.io>
-rw-r--r-- | src/qdoc/cppcodeparser.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qdoc/cppcodeparser.cpp b/src/qdoc/cppcodeparser.cpp index 74ae8a9ed..05d177f73 100644 --- a/src/qdoc/cppcodeparser.cpp +++ b/src/qdoc/cppcodeparser.cpp @@ -338,7 +338,7 @@ Node* CppCodeParser::processTopicCommand(const Doc& doc, } else if (command == COMMAND_QMLTYPE) { QmlTypeNode *qcn = nullptr; Node *candidate = qdb_->primaryTreeRoot()->findChildNode(arg.first, Node::QML); - if (candidate != nullptr) + if (candidate != nullptr && candidate->isQmlType()) qcn = static_cast<QmlTypeNode*>(candidate); else qcn = new QmlTypeNode(qdb_->primaryTreeRoot(), arg.first); @@ -347,7 +347,7 @@ Node* CppCodeParser::processTopicCommand(const Doc& doc, } else if (command == COMMAND_JSTYPE) { QmlTypeNode *qcn = nullptr; Node *candidate = qdb_->primaryTreeRoot()->findChildNode(arg.first, Node::JS); - if (candidate != nullptr) + if (candidate != nullptr && candidate->isJsType()) qcn = static_cast<QmlTypeNode*>(candidate); else qcn = new QmlTypeNode(qdb_->primaryTreeRoot(), arg.first, Node::JsType); |