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>
This commit is contained in:
Martin Smith 2012-03-16 09:50:39 +01:00 committed by Qt by Nokia
parent 52c1df5a7c
commit c227546d2e

View File

@ -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");