From c227546d2e4077ff85ea3a830f9109ada28f12b9 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Fri, 16 Mar 2012 09:50:39 +0100 Subject: 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 --- src/tools/qdoc/ditaxmlgenerator.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/tools') 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(); // 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"); -- cgit v1.2.3