diff options
author | Casper van Donderen <casper.vandonderen@nokia.com> | 2012-04-16 10:11:26 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-04-17 16:28:46 +0200 |
commit | 1d0ed55e6e7529608f87beb2eceaefffffeaea61 (patch) | |
tree | 5ef1f356c0b21f6f166ef385b5b394168a15dffd /src/tools | |
parent | 19768e115a61e4f635413a85b2822cf7d2deeecd (diff) |
QDoc: Write subclasses of namespaces in automatic ditamap.
Now we also write the subclasses of namespaces sorted to qt.ditamap.
Change-Id: I4a4376bac208b9bacd5a2ddd5265faef13dc2eba
Reviewed-by: Martin Smith <martin.smith@nokia.com>
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/qdoc/ditaxmlgenerator.cpp | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/src/tools/qdoc/ditaxmlgenerator.cpp b/src/tools/qdoc/ditaxmlgenerator.cpp index 1f986e35ff..f49b267d2a 100644 --- a/src/tools/qdoc/ditaxmlgenerator.cpp +++ b/src/tools/qdoc/ditaxmlgenerator.cpp @@ -6048,23 +6048,32 @@ void DitaXmlGenerator::writeTopicrefs(NodeMultiMap* nmm, const QString& navtitle xmlWriter().writeAttribute("navtitle",i.key()); xmlWriter().writeAttribute("href",fileName(i.value())); switch (i.value()->type()) { - case Node::Class: { - const NamespaceNode* nn = static_cast<const NamespaceNode*>(i.value()); - const NodeList& c = nn->childNodes(); - for (int j=0; j<c.size(); ++j) { - if (c[j]->isInternal() || c[j]->access() == Node::Private || c[j]->doc().isEmpty()) - continue; - if (c[j]->type() == Node::Class) { + case Node::Class: + case Node::Namespace: { + const NamespaceNode* nn = static_cast<const NamespaceNode*>(i.value()); + const NodeList& c = nn->childNodes(); + QMap<QString, const Node*> tempMap; + for (int j=0; j<c.size(); ++j) { + if (c[j]->isInternal() || c[j]->access() == Node::Private || c[j]->doc().isEmpty()) + continue; + if (c[j]->type() == Node::Class) { + tempMap.insert(c[j]->name(), c[j]); + } + } + QMap<QString, const Node*>::iterator classIterator = tempMap.begin(); + while (classIterator != tempMap.end()) { + const Node* currentNode = static_cast<const Node*>(classIterator.value()); writeStartTag(DT_topicref); - xmlWriter().writeAttribute("navtitle",c[j]->name()); - xmlWriter().writeAttribute("href",fileName(c[j])); + xmlWriter().writeAttribute("navtitle",currentNode->name()); + xmlWriter().writeAttribute("href",fileName(currentNode)); writeEndTag(); // </topicref> + ++classIterator; } + + break; } - break; - } - default: - break; + default: + break; } writeEndTag(); // </topicref> ++i; |