diff options
author | Casper van Donderen <casper.vandonderen@nokia.com> | 2012-03-25 20:22:52 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-28 05:07:08 +0200 |
commit | 1f742095ce762074e01680d897afa4a30acd8756 (patch) | |
tree | e140f3510fbaf02755725fb0cd78fcfd31c7a24c /src/tools | |
parent | 291f436ab6f83d1215cb7fe1f3c0573d812538fd (diff) |
qdoc: Do not write index.dita multiple times in ditamap.
Change-Id: I69719237d0ab567ce2a606c96b38f6baa2a601b5
Reviewed-by: Martin Smith <martin.smith@nokia.com>
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/qdoc/ditaxmlgenerator.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/tools/qdoc/ditaxmlgenerator.cpp b/src/tools/qdoc/ditaxmlgenerator.cpp index a25fc0d4bb..1f0a383d25 100644 --- a/src/tools/qdoc/ditaxmlgenerator.cpp +++ b/src/tools/qdoc/ditaxmlgenerator.cpp @@ -5838,6 +5838,9 @@ void DitaXmlGenerator::writeDitaMap(const Tree *tree) { QString doctype; +/* + Remove #if 0 to get a flat ditamap. +*/ #if 0 beginSubPage(tree->root(),"qt.ditamap"); doctype = "<!DOCTYPE map PUBLIC \"-//OASIS//DTD DITA Map//EN\" \"map.dtd\">"; @@ -5969,6 +5972,12 @@ void DitaXmlGenerator::writeTopicrefs(NodeMultiMap* nmm, const QString& navtitle xmlWriter().writeAttribute("navtitle",navtitle); NodeMultiMap::iterator i = nmm->begin(); while (i != nmm->end()) { + // Hardcode not writing index.dita multiple times in the tree. + // index.dita should only appear at the top of the ditamap. + if (fileName(i.value()) == "index.dita") { + i++; + continue; + } writeStartTag(DT_topicref); xmlWriter().writeAttribute("navtitle",i.key()); xmlWriter().writeAttribute("href",fileName(i.value())); |