diff options
author | Martin Smith <martin.smith@nokia.com> | 2012-03-16 09:50:39 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-17 01:52:12 +0100 |
commit | c227546d2e4077ff85ea3a830f9109ada28f12b9 (patch) | |
tree | c5caa430b5a6941839d15f51bdc11eab777c5e7a /src/tools/qdoc/ditaxmlgenerator.cpp | |
parent | 52c1df5a7c1a95b420c7cf65ffd092a787bf0779 (diff) |
qdoc: Structure the DITA map with a root node.
Use the title from the index.html page for the
navtitle, if there is a title on the index.html
page. Otherwise use the project as the navtitle.
Task-number: Mzilla bug - 7229
Change-Id: I25fc1f09b0bdff58c6340cec7d9d8a43d95845a2
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Diffstat (limited to 'src/tools/qdoc/ditaxmlgenerator.cpp')
-rw-r--r-- | src/tools/qdoc/ditaxmlgenerator.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/tools/qdoc/ditaxmlgenerator.cpp b/src/tools/qdoc/ditaxmlgenerator.cpp index 6b0c2dce88..f19f902c6b 100644 --- a/src/tools/qdoc/ditaxmlgenerator.cpp +++ b/src/tools/qdoc/ditaxmlgenerator.cpp @@ -5900,9 +5900,15 @@ void DitaXmlGenerator::writeDitaMap(const Tree *tree) writeEndTag(); // </topicmeta> writeStartTag(DT_topicref); - xmlWriter().writeAttribute("navtitle",project); - if (rootPageNode) + if (rootPageNode) { + if (!rootPageNode->title().isEmpty()) + xmlWriter().writeAttribute("navtitle",rootPageNode->title()); + else + xmlWriter().writeAttribute("navtitle",project); xmlWriter().writeAttribute("href",fileName(rootPageNode)); + } + else + xmlWriter().writeAttribute("navtitle",project); writeTopicrefs(pageTypeMaps[Node::OverviewPage], "overviews"); writeTopicrefs(pageTypeMaps[Node::HowToPage], "howtos"); |