From 5a678ec9a8ae5159456e4af7b81968e4ea027d6b Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Thu, 15 Nov 2018 00:13:58 +0100 Subject: qdoc: Fix link resolution for types under namespaces When QDoc tries to resolve a link to a type from a function parameter, it sets a 'TypesOnly' find flag. For types that contain a scope resolution operator(s), i.e. double-colons, QDoc first looks for the scope (namespace), and then the type under that scope. The problem was that the TypesOnly flag was passed to also the function call to find the namespace. This failed as namespaces are not types. Another problematic corner case happened with name clashes between a C++ module and a namespace, as is the case with e.g. 'Qt3DCore'. Here, QDoc tried to resolve the module node as the scope, and subsequently failed to find anything under that scope as module nodes have no children. Task-number: QTBUG-69484 Change-Id: Ia3c8fa96263a24176a11cf23a3469a374de7973a Reviewed-by: Paul Wicking Reviewed-by: Martin Smith --- src/qdoc/node.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/qdoc/node.cpp') diff --git a/src/qdoc/node.cpp b/src/qdoc/node.cpp index e23b10d57..6893b6367 100644 --- a/src/qdoc/node.cpp +++ b/src/qdoc/node.cpp @@ -841,7 +841,7 @@ Node *Aggregate::findChildNode(const QString& name, Node::Genus genus, int findF } else { NodeList nodes = childMap_.values(name); if (!nodes.isEmpty()) { - for (int i=0; igenus()) { if (findFlags & TypesOnly) { @@ -853,7 +853,8 @@ Node *Aggregate::findChildNode(const QString& name, Node::Genus genus, int findF && !node->isJsBasicType() && !node->isEnumType()) continue; - } + } else if (findFlags & IgnoreModules && node->isModule()) + continue; return node; } } -- cgit v1.2.1