QDoc: Use \page title with prev/next links in DITAXML.
authorCasper van Donderen <casper.vandonderen@nokia.com>
Fri, 1 Jun 2012 12:11:42 +0000 (14:11 +0200)
committerQt by Nokia <qt-info@nokia.com>
Fri, 1 Jun 2012 18:34:31 +0000 (20:34 +0200)
Change-Id: I260998986752f5c8cc48279c04557c925af1cb14
Reviewed-by: Martin Smith <martin.smith@nokia.com>
src/tools/qdoc/ditaxmlgenerator.cpp

index c448f0e..70f63f7 100644 (file)
@@ -2414,16 +2414,28 @@ void DitaXmlGenerator::writeRelatedLinks(const FakeNode* node, CodeMarker* marke
         if (node->links().contains(Node::PreviousLink)) {
             linkPair = node->links()[Node::PreviousLink];
             linkNode = findNodeForTarget(linkPair.first, node, marker);
+            if (linkNode->type() == Node::Fake) {
+                const FakeNode *fakeNode = static_cast<const FakeNode*>(linkNode);
+                linkPair.second = fakeNode->title();
+            }
             writeLink(linkNode, linkPair.second, "previous");
         }
         if (node->links().contains(Node::NextLink)) {
             linkPair = node->links()[Node::NextLink];
             linkNode = findNodeForTarget(linkPair.first, node, marker);
+            if (linkNode->type() == Node::Fake) {
+                const FakeNode *fakeNode = static_cast<const FakeNode*>(linkNode);
+                linkPair.second = fakeNode->title();
+            }
             writeLink(linkNode, linkPair.second, "next");
         }
         if (node->links().contains(Node::StartLink)) {
             linkPair = node->links()[Node::StartLink];
             linkNode = findNodeForTarget(linkPair.first, node, marker);
+            if (linkNode->type() == Node::Fake) {
+                const FakeNode *fakeNode = static_cast<const FakeNode*>(linkNode);
+                linkPair.second = fakeNode->title();
+            }
             writeLink(linkNode, linkPair.second, "parent");
         }
         writeEndTag(); // </related-links>