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 <venugopal.shivashankar@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This commit is contained in:
Casper van Donderen 2012-05-09 16:45:37 +02:00 committed by Qt by Nokia
parent cc8d9fb85e
commit 4f6b1cad56

View File

@ -2548,7 +2548,10 @@ void DitaXmlGenerator::generateHeader(const Node* node,
if (!outputclass.isEmpty())
xmlWriter().writeAttribute("outputclass",outputclass);
writeStartTag(nameTag); // <title> or <apiName>
writeCharacters(name);
if (!name.isEmpty())
writeCharacters(name);
else
writeCharacters(node->name());
writeEndTag(); // </title> or </apiName>
}