summaryrefslogtreecommitdiffstats
path: root/tools/qdoc3
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@nokia.com>2011-03-10 08:25:47 (GMT)
committerMartin Smith <martin.smith@nokia.com>2011-03-10 08:25:47 (GMT)
commite6589006ce57734f25c1ac44434457d5e523fdf0 (patch)
tree4e0611193ffec424247f0ca0249f2d2a98fae8f9 /tools/qdoc3
parentfcc8a1b6ff261f128969458146185c9ed9d5892b (diff)
downloadQt-e6589006ce57734f25c1ac44434457d5e523fdf0.zip
Qt-e6589006ce57734f25c1ac44434457d5e523fdf0.tar.gz
Qt-e6589006ce57734f25c1ac44434457d5e523fdf0.tar.bz2
qdoc: Added <publisher> and <permissions> elements.
Diffstat (limited to 'tools/qdoc3')
-rw-r--r--tools/qdoc3/ditaxmlgenerator.cpp32
-rw-r--r--tools/qdoc3/node.cpp16
-rw-r--r--tools/qdoc3/node.h6
3 files changed, 45 insertions, 9 deletions
diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp
index 6ea371c..2c02892 100644
--- a/tools/qdoc3/ditaxmlgenerator.cpp
+++ b/tools/qdoc3/ditaxmlgenerator.cpp
@@ -5540,7 +5540,7 @@ void DitaXmlGenerator::writeDitaMap()
\o <author> *
\o <brand>
\o <category> *
- \o <compomnent>
+ \o <compomnent> *
\o <copyrholder>
\o <copyright>
\o <created>
@@ -5550,19 +5550,19 @@ void DitaXmlGenerator::writeDitaMap()
\o <keywords>
\o <metadata> *
\o <othermeta>
- \o <permissions>
+ \o <permissions> *
\o <platform>
- \o <prodinfo>
- \o <prodname>
+ \o <prodinfo> *
+ \o <prodname> *
\o <prolog> *
- \o <publisher>
+ \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.
@@ -5575,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";
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;