diff options
author | Geir Vattekar <geir.vattekar@nokia.com> | 2011-03-10 13:56:05 (GMT) |
---|---|---|
committer | Geir Vattekar <geir.vattekar@nokia.com> | 2011-03-10 13:56:05 (GMT) |
commit | 2b0bfcf72f145b6948d9cdfd2db6c9f2e10b5def (patch) | |
tree | ffdda9d1197bd3237a5a4d433da4353a4e65cfe3 | |
parent | 5448446a4e02c50d83ad7e8c6c0d8022d0aaa876 (diff) | |
parent | e6589006ce57734f25c1ac44434457d5e523fdf0 (diff) | |
download | Qt-2b0bfcf72f145b6948d9cdfd2db6c9f2e10b5def.zip Qt-2b0bfcf72f145b6948d9cdfd2db6c9f2e10b5def.tar.gz Qt-2b0bfcf72f145b6948d9cdfd2db6c9f2e10b5def.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-doc-team into 4.7
-rw-r--r-- | tools/qdoc3/ditaxmlgenerator.cpp | 68 | ||||
-rw-r--r-- | tools/qdoc3/ditaxmlgenerator.h | 2 | ||||
-rw-r--r-- | tools/qdoc3/node.cpp | 16 | ||||
-rw-r--r-- | tools/qdoc3/node.h | 6 |
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; |