summaryrefslogtreecommitdiffstats
path: root/tools/qdoc3
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@nokia.com>2011-03-09 07:47:27 (GMT)
committerMartin Smith <martin.smith@nokia.com>2011-03-09 07:47:27 (GMT)
commit69a5b6f739e514f75a74444313597b40d30ee827 (patch)
tree143e454593bc37faa36ae8c99c50921f42a6b18c /tools/qdoc3
parentc7871bcd8dc79103d21521cf365df12d335b0f7a (diff)
downloadQt-69a5b6f739e514f75a74444313597b40d30ee827.zip
Qt-69a5b6f739e514f75a74444313597b40d30ee827.tar.gz
Qt-69a5b6f739e514f75a74444313597b40d30ee827.tar.bz2
qdoc: Added <prodinfo> element and its contents to the metadata.
Diffstat (limited to 'tools/qdoc3')
-rw-r--r--tools/qdoc3/ditaxmlgenerator.cpp31
-rw-r--r--tools/qdoc3/ditaxmlgenerator.h2
2 files changed, 28 insertions, 5 deletions
diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp
index 66f4a91..cc7b1da 100644
--- a/tools/qdoc3/ditaxmlgenerator.cpp
+++ b/tools/qdoc3/ditaxmlgenerator.cpp
@@ -440,7 +440,8 @@ void DitaXmlGenerator::initializeGenerator(const Config &config)
Config::dot +
DITAXMLGENERATOR_CUSTOMHEADELEMENTS);
codeIndent = config.getInt(CONFIG_CODEINDENT);
-
+ version = config.getString(CONFIG_VERSION);
+ vrm = version.split(".");
}
/*!
@@ -5536,9 +5537,9 @@ void DitaXmlGenerator::writeDitaMap()
\list
\o <audience>
- \o <author>
+ \o <author> *
\o <brand>
- \o <category>
+ \o <category> *
\o <compomnent>
\o <copyrholder>
\o <copyright>
@@ -5547,13 +5548,13 @@ void DitaXmlGenerator::writeDitaMap()
\o <critdates>
\o <keyword>
\o <keywords>
- \o <metadata>
+ \o <metadata> *
\o <othermeta>
\o <permissions>
\o <platform>
\o <prodinfo>
\o <prodname>
- \o <prolog>
+ \o <prolog> *
\o <publisher>
\o <resourceid>
\o <revised>
@@ -5563,6 +5564,8 @@ void DitaXmlGenerator::writeDitaMap()
\o <vrm>
\o <vrmlist>
\endlist
+
+ \node * means the tag has been used.
*/
void
@@ -5610,6 +5613,24 @@ DitaXmlGenerator::writeProlog(const InnerNode* inner, CodeMarker* marker)
}
xmlWriter().writeCharacters(category);
writeEndTag(); // <category>
+ if (vrm.size() > 0) {
+ qDebug() << "VRM" << vrm;
+ writeStartTag(DT_prodinfo);
+ writeStartTag(DT_prodname);
+ xmlWriter().writeCharacters(projectDescription);
+ writeEndTag(); // <prodname>
+ writeStartTag(DT_vrmlist);
+ writeStartTag(DT_vrm);
+ if (vrm.size() > 0)
+ xmlWriter().writeAttribute("version",vrm[0]);
+ if (vrm.size() > 1)
+ xmlWriter().writeAttribute("release",vrm[1]);
+ if (vrm.size() > 2)
+ xmlWriter().writeAttribute("modification",vrm[2]);
+ writeEndTag(); // <vrm>
+ writeEndTag(); // <vrmlist>
+ writeEndTag(); // <prodinfo>
+ }
writeEndTag(); // <metadata>
writeEndTag(); // <prolog>
}
diff --git a/tools/qdoc3/ditaxmlgenerator.h b/tools/qdoc3/ditaxmlgenerator.h
index 32a9b94..3e66318 100644
--- a/tools/qdoc3/ditaxmlgenerator.h
+++ b/tools/qdoc3/ditaxmlgenerator.h
@@ -468,6 +468,8 @@ class DitaXmlGenerator : public PageGenerator
QString projectDescription;
QString projectUrl;
QString navigationLinks;
+ QString version;
+ QStringList vrm;
QStringList stylesheets;
QStringList customHeadElements;
const Tree* myTree;