diff options
author | Liang Qi <liang.qi@qt.io> | 2019-01-04 12:11:11 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2019-01-04 13:03:26 +0100 |
commit | 7b23692538f55d499bf094a750311e1e4cd13ec6 (patch) | |
tree | 7e85cdabe0e069ee8fcbc3da3764327b4f8e2ba2 /src/qdoc/tree.cpp | |
parent | aa316d1d463777612db4b144d945bbaf67481494 (diff) | |
parent | 32897fd0b98966d22ecbd475a0e6a77ca8b1108d (diff) | |
download | qttools-7b23692538f55d499bf094a750311e1e4cd13ec6.tar.gz |
Merge remote-tracking branch 'origin/5.12' into dev
Conflicts:
src/qdoc/htmlgenerator.cpp
src/qtattributionsscanner/qdocgenerator.cpp
Done-With: Martin Smith <martin.smith@qt.io>
Change-Id: I56a23175579a1a699939179da2f35bbcd6c73367
Diffstat (limited to 'src/qdoc/tree.cpp')
-rw-r--r-- | src/qdoc/tree.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/qdoc/tree.cpp b/src/qdoc/tree.cpp index ea3950a9e..4a7b15b09 100644 --- a/src/qdoc/tree.cpp +++ b/src/qdoc/tree.cpp @@ -885,7 +885,11 @@ const Node* Tree::findNode(const QStringList& path, if (node == 0 || !node->isAggregate()) break; - const Node* next = static_cast<const Aggregate*>(node)->findChildNode(path.at(i), genus, findFlags); + // Clear the TypesOnly flag until the last path segment, as e.g. namespaces are not types. + // We also ignore module nodes as they are not aggregates and thus have no children. + int tmpFlags = (i < path.size() - 1) ? (findFlags & ~TypesOnly) | IgnoreModules : findFlags; + + const Node* next = static_cast<const Aggregate*>(node)->findChildNode(path.at(i), genus, tmpFlags); if (!next && (findFlags & SearchEnumValues) && i == path.size()-1) { next = static_cast<const Aggregate*>(node)->findEnumNodeForValue(path.at(i)); } @@ -893,7 +897,7 @@ const Node* Tree::findNode(const QStringList& path, node->isClass() && (findFlags & SearchBaseClasses)) { NodeList baseClasses = allBaseClasses(static_cast<const ClassNode*>(node)); foreach (const Node* baseClass, baseClasses) { - next = static_cast<const Aggregate*>(baseClass)->findChildNode(path.at(i), genus, findFlags); + next = static_cast<const Aggregate*>(baseClass)->findChildNode(path.at(i), genus, tmpFlags); if (!next && (findFlags & SearchEnumValues) && i == path.size() - 1) next = static_cast<const Aggregate*>(baseClass)->findEnumNodeForValue(path.at(i)); if (next) { |