summaryrefslogtreecommitdiffstats
path: root/tools/qdoc3
diff options
context:
space:
mode:
authorDavid Boddie <david.boddie@nokia.com>2011-03-14 14:45:20 (GMT)
committerDavid Boddie <david.boddie@nokia.com>2011-03-14 14:45:20 (GMT)
commit1b87e4690da4073677df1741712c71b97f2dd1f0 (patch)
tree1c77ce75b4103bca91194f1038f6a686d9285026 /tools/qdoc3
parent50671831eb42423db3e41852b68187d8833c2a0c (diff)
parent504666b545deafa3319ff699eff74eacc8d8559c (diff)
downloadQt-1b87e4690da4073677df1741712c71b97f2dd1f0.zip
Qt-1b87e4690da4073677df1741712c71b97f2dd1f0.tar.gz
Qt-1b87e4690da4073677df1741712c71b97f2dd1f0.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-doc-team into 4.7
Diffstat (limited to 'tools/qdoc3')
-rw-r--r--tools/qdoc3/ditaxmlgenerator.cpp68
-rw-r--r--tools/qdoc3/ditaxmlgenerator.h2
-rw-r--r--tools/qdoc3/node.cpp16
-rw-r--r--tools/qdoc3/node.h6
4 files changed, 78 insertions, 14 deletions
diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp
index 66f4a91..2c02892 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,10 +5537,10 @@ void DitaXmlGenerator::writeDitaMap()
\list
\o <audience>
- \o <author>
+ \o <author> *
\o <brand>
- \o <category>
- \o <compomnent>
+ \o <category> *
+ \o <compomnent> *
\o <copyrholder>
\o <copyright>
\o <created>
@@ -5547,22 +5548,24 @@ void DitaXmlGenerator::writeDitaMap()
\o <critdates>
\o <keyword>
\o <keywords>
- \o <metadata>
+ \o <metadata> *
\o <othermeta>
- \o <permissions>
+ \o <permissions> *
\o <platform>
- \o <prodinfo>
- \o <prodname>
- \o <prolog>
- \o <publisher>
+ \o <prodinfo> *
+ \o <prodname> *
+ \o <prolog> *
+ \o <publisher> *
\o <resourceid>
\o <revised>
\o <source>
\o <tm>
\o <unknown>
- \o <vrm>
- \o <vrmlist>
+ \o <vrm> *
+ \o <vrmlist> *
\endlist
+
+ \node * means the tag has been used.
*/
void
@@ -5572,13 +5575,27 @@ DitaXmlGenerator::writeProlog(const InnerNode* inner, CodeMarker* marker)
return;
writeStartTag(DT_prolog);
- writeStartTag(DT_author);
QString author = inner->author();
+ writeStartTag(DT_author);
if (author.isEmpty())
author = "Qt Development Frameworks";
xmlWriter().writeCharacters(author);
writeEndTag(); // <author>
-
+
+ QString publisher = inner->publisher();
+ writeStartTag(DT_publisher);
+ if (publisher.isEmpty())
+ publisher = "Nokia";
+ xmlWriter().writeCharacters(publisher);
+ writeEndTag(); // <publisher>
+
+ QString permissions = inner->permissions();
+ writeStartTag(DT_permissions);
+ if (permissions.isEmpty())
+ permissions = "all";
+ xmlWriter().writeAttribute("view",permissions);
+ writeEndTag(); // <permissions>
+
writeStartTag(DT_metadata);
writeStartTag(DT_category);
QString category = "Page";
@@ -5610,6 +5627,29 @@ DitaXmlGenerator::writeProlog(const InnerNode* inner, CodeMarker* marker)
}
xmlWriter().writeCharacters(category);
writeEndTag(); // <category>
+ if (vrm.size() > 0) {
+ 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>
+ QString component = inner->moduleName();
+ if (!component.isEmpty()) {
+ writeStartTag(DT_component);
+ xmlWriter().writeCharacters(component);
+ writeEndTag(); // <prodinfo>
+ }
+ 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;
diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp
index 161c87a..3b1f280 100644
--- a/tools/qdoc3/node.cpp
+++ b/tools/qdoc3/node.cpp
@@ -779,6 +779,22 @@ void InnerNode::removeChild(Node *child)
Sets the \a author.
*/
+/*! \fn QString InnerNode::publisher() const
+ Returns the publisher.
+ */
+
+/*! \fn void InnerNode::setPublisher(const QString& publisher)
+ Sets the \a publisher.
+ */
+
+/*! \fn QString InnerNode::permissions() const
+ Returns the permissions.
+ */
+
+/*! \fn void InnerNode::setPermissions(const QString& permissions)
+ Sets the \a permissions.
+ */
+
/*!
Find the module (QtCore, QtGui, etc.) to which the class belongs.
We do this by obtaining the full path to the header file's location
diff --git a/tools/qdoc3/node.h b/tools/qdoc3/node.h
index 3869e68..92a7c9f 100644
--- a/tools/qdoc3/node.h
+++ b/tools/qdoc3/node.h
@@ -264,6 +264,10 @@ class InnerNode : public Node
QString author() const { return author_; }
void setAuthor(const QString& author) { author_ = author; }
+ QString publisher() const { return publisher_; }
+ void setPublisher(const QString& publisher) { publisher_ = publisher; }
+ QString permissions() const { return permissions_; }
+ void setPermissions(const QString& permissions) { permissions_ = permissions; }
QStringList primaryKeys();
QStringList secondaryKeys();
const QStringList& pageKeywords() const { return pageKeywds; }
@@ -283,6 +287,8 @@ class InnerNode : public Node
void removeRelated(Node* pseudoChild);
QString author_;
+ QString publisher_;
+ QString permissions_;
QStringList pageKeywds;
QStringList inc;
NodeList children;