From 4f6b1cad565ab290af4e92e1eec48f279301dc04 Mon Sep 17 00:00:00 2001 From: Casper van Donderen Date: Wed, 9 May 2012 16:45:37 +0200 Subject: [PATCH] QDoc: Use node name for page DITA title when name argument is empty. When QML documentation is being generated from .qdoc files the 'name' argument of the generateHeader() function is always empty, since the plaincodemarker sets the plainFullTitle to "". In that case the Node->name() should be used to specify the title of the page, this will always be the first argument given to the \qmlclass qdoc command. Change-Id: If3e86ce59be1fdad608fab9f32fbe7bbca97aa93 Reviewed-by: Venugopal Shivashankar Reviewed-by: Lars Knoll --- src/tools/qdoc/ditaxmlgenerator.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/tools/qdoc/ditaxmlgenerator.cpp b/src/tools/qdoc/ditaxmlgenerator.cpp index fc02331170..9e22d08a40 100644 --- a/src/tools/qdoc/ditaxmlgenerator.cpp +++ b/src/tools/qdoc/ditaxmlgenerator.cpp @@ -2548,7 +2548,10 @@ void DitaXmlGenerator::generateHeader(const Node* node, if (!outputclass.isEmpty()) xmlWriter().writeAttribute("outputclass",outputclass); writeStartTag(nameTag); // or <apiName> - writeCharacters(name); + if (!name.isEmpty()) + writeCharacters(name); + else + writeCharacters(node->name()); writeEndTag(); // or }