summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCasper van Donderen <casper.vandonderen@nokia.com>2012-05-09 16:45:37 +0200
committerQt by Nokia <qt-info@nokia.com>2012-05-09 17:30:14 +0200
commit4f6b1cad565ab290af4e92e1eec48f279301dc04 (patch)
treefba9c249cf672bb12db413adc571c74b9c938c51
parentcc8d9fb85e816fc235c0343b484ff9dec61ed30c (diff)
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>
-rw-r--r--src/tools/qdoc/ditaxmlgenerator.cpp5
1 files changed, 4 insertions, 1 deletions
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); // <title> or <apiName>
- writeCharacters(name);
+ if (!name.isEmpty())
+ writeCharacters(name);
+ else
+ writeCharacters(node->name());
writeEndTag(); // </title> or </apiName>
}