summaryrefslogtreecommitdiffstats
path: root/src/tools/qdoc/node.cpp
diff options
context:
space:
mode:
authorTopi Reinio <[email protected]>2015-03-16 12:55:09 +0100
committerMartin Smith <[email protected]>2015-03-16 12:50:09 +0000
commit642b80e9e9a4e6068fe440f00239c6e1bb3249b1 (patch)
tree4002154b76d7f1221f612ff25223a1bd87986c09 /src/tools/qdoc/node.cpp
parent9a25fc5abb7cf0bd5f88e7755b875fd55a62291b (diff)
qdoc: Recursively set the output subdirectory for InnerNode
When QDoc resolves and combines namespace child nodes located in different modules to be under a single namespace node, it also changes the output subdirectory of each child according to the destination module. However, if one of those child nodes is a namespace node or a class node with nested child classes, the output subdir of those children is left as the old (incorrect) directory. This change fixes that by making the setOutputSubdirectory() function recursive for nodes of type InnerNode. Change-Id: I07b2f406283e1bf3bd8643797c3b789b0211b5bb Reviewed-by: Martin Smith <[email protected]>
Diffstat (limited to 'src/tools/qdoc/node.cpp')
-rw-r--r--src/tools/qdoc/node.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/tools/qdoc/node.cpp b/src/tools/qdoc/node.cpp
index a6999d3856b..b2f93cc1310 100644
--- a/src/tools/qdoc/node.cpp
+++ b/src/tools/qdoc/node.cpp
@@ -1199,6 +1199,16 @@ void InnerNode::removeChild(Node *child)
}
/*!
+ Recursively sets the output subdirectory for children
+ */
+void InnerNode::setOutputSubdirectory(const QString &t)
+{
+ Node::setOutputSubdirectory(t);
+ for (int i = 0; i < childNodes().size(); ++i)
+ childNodes().at(i)->setOutputSubdirectory(t);
+}
+
+/*!
Find the module (Qt Core, Qt GUI, etc.) to which the class belongs.
We do this by obtaining the full path to the header file's location
and examine everything between "src/" and the filename. This is