summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/qdoc/generator.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/qdoc/generator.cpp b/src/qdoc/generator.cpp
index ac6577c81..71da36e3c 100644
--- a/src/qdoc/generator.cpp
+++ b/src/qdoc/generator.cpp
@@ -600,8 +600,11 @@ QString Generator::fullDocumentLocation(const Node *node, bool useSubdir)
Node *parentNode = nullptr;
- if ((parentNode = node->parent()))
- parentName = fullDocumentLocation(node->parent());
+ if ((parentNode = node->parent())) {
+ // use the parent's name unless the parent is the root namespace
+ if (!node->parent()->isNamespace() || !node->parent()->name().isEmpty())
+ parentName = fullDocumentLocation(node->parent());
+ }
switch (node->nodeType()) {
case Node::Class: