summaryrefslogtreecommitdiffstats
path: root/tools/qdoc3/pagegenerator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/qdoc3/pagegenerator.cpp')
-rw-r--r--tools/qdoc3/pagegenerator.cpp19
1 files changed, 7 insertions, 12 deletions
diff --git a/tools/qdoc3/pagegenerator.cpp b/tools/qdoc3/pagegenerator.cpp
index 83ea561..7d9fbee 100644
--- a/tools/qdoc3/pagegenerator.cpp
+++ b/tools/qdoc3/pagegenerator.cpp
@@ -81,14 +81,13 @@ QString PageGenerator::fileBase(const Node *node)
{
if (node->relates())
node = node->relates();
- else if (!node->isInnerNode()) {
+ else if (!node->isInnerNode())
node = node->parent();
#ifdef QDOC_QML
- if (node->subType() == Node::QmlPropertyGroup) {
- node = node->parent();
- }
-#endif
+ if (node->subType() == Node::QmlPropertyGroup) {
+ node = node->parent();
}
+#endif
QString base = node->doc().baseName();
if (!base.isEmpty())
@@ -97,6 +96,7 @@ QString PageGenerator::fileBase(const Node *node)
const Node *p = node;
forever {
+ const Node *pp = p->parent();
base.prepend(p->name());
#ifdef QDOC_QML
/*
@@ -104,15 +104,10 @@ QString PageGenerator::fileBase(const Node *node)
we prepend "qml-" to the file name of QML element doc
files.
*/
- if ((p->subType() == Node::QmlClass) ||
- (p->subType() == Node::QmlPropertyGroup))
- base.prepend("qml-");
- else if ((p->type() == Node::QmlProperty) ||
- (p->type() == Node::QmlSignal) ||
- (p->type() == Node::QmlMethod))
+ if (p->subType() == Node::QmlClass) {
base.prepend("qml-");
+ }
#endif
- const Node *pp = p->parent();
if (!pp || pp->name().isEmpty() || pp->type() == Node::Fake)
break;
base.prepend(QLatin1Char('-'));