summaryrefslogtreecommitdiffstats
path: root/src/tools/qdoc/tree.cpp
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@digia.com>2015-04-15 14:14:30 +0200
committerTopi Reiniƶ <topi.reinio@digia.com>2015-04-27 11:47:34 +0000
commit3e7cf5981aa536c18aee814b9f5e221c5a8a4d1a (patch)
tree1ea3f59ea7043b3101226a8603d38ed6fb9ca148 /src/tools/qdoc/tree.cpp
parentb71535a9236a33371da36d89d38872d3ae91fbf0 (diff)
qdoc: Resolve base classes for a class declared in a namespace
For classes declared in a namespace, QDoc needs to take account the fact that its base classes typically are not qualified with the namespace name if those base classes are from the same namespace. There already was code for this, but it was disabled by a macro. This change re-enables it, and adds an additional check to restart the search in valid namespaces only. Change-Id: Ia07dcb783b59de5fc9ddcfd43000a63c6c74ebe1 Reviewed-by: Martin Smith <martin.smith@digia.com>
Diffstat (limited to 'src/tools/qdoc/tree.cpp')
-rw-r--r--src/tools/qdoc/tree.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/tools/qdoc/tree.cpp b/src/tools/qdoc/tree.cpp
index d0d0bcbb5a..420396e51c 100644
--- a/src/tools/qdoc/tree.cpp
+++ b/src/tools/qdoc/tree.cpp
@@ -388,7 +388,6 @@ void Tree::resolveInheritanceHelper(int pass, ClassNode* cn)
while (b != bases.end()) {
if (!(*b).node_) {
Node* n = qdb_->findClassNode((*b).path_);
-#if 0
/*
If the node for the base class was not found,
the reason might be that the subclass is in a
@@ -401,9 +400,11 @@ void Tree::resolveInheritanceHelper(int pass, ClassNode* cn)
*/
if (!n) {
InnerNode* parent = cn->parent();
- n = findClassNode((*b).path_, parent);
+ if (parent)
+ // Exclude the root namespace
+ if (parent->isNamespace() && !parent->name().isEmpty())
+ n = findClassNode((*b).path_, parent);
}
-#endif
if (n) {
ClassNode* bcn = static_cast<ClassNode*>(n);
(*b).node_ = bcn;