diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-03-18 12:23:35 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-03-18 12:23:35 (GMT) |
commit | f68f1de5b866a050c4b39f8eed984831b0e6956e (patch) | |
tree | d835edc0bfb0cef56f6f66a5de1978cd04ec224e /tools | |
parent | 436071011fe4e32bc815dbb84982032b5c5de99a (diff) | |
parent | 3a764060dab07ef0b51d7027b9606c73c0701d2f (diff) | |
download | Qt-f68f1de5b866a050c4b39f8eed984831b0e6956e.zip Qt-f68f1de5b866a050c4b39f8eed984831b0e6956e.tar.gz Qt-f68f1de5b866a050c4b39f8eed984831b0e6956e.tar.bz2 |
Merge branch '4.7' of git://scm.dev.nokia.troll.no/qt/qt-doc-team
* '4.7' of git://scm.dev.nokia.troll.no/qt/qt-doc-team:
qdoc: Added the <othermeta> element.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qdoc3/ditaxmlgenerator.cpp | 12 | ||||
-rw-r--r-- | tools/qdoc3/node.cpp | 15 | ||||
-rw-r--r-- | tools/qdoc3/node.h | 4 |
3 files changed, 30 insertions, 1 deletions
diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index cc9b4fa..5d3e34a 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -5667,9 +5667,19 @@ DitaXmlGenerator::writeProlog(const InnerNode* inner, CodeMarker* marker) if (!component.isEmpty()) { writeStartTag(DT_component); xmlWriter().writeCharacters(component); - writeEndTag(); // <prodinfo> + writeEndTag(); // <component> } writeEndTag(); // <prodinfo> + if (inner->hasOtherMetadata()) { + const QMap<QString, QString>& omd = inner->otherMetadata(); + QMapIterator<QString, QString> i(omd); + while (i.hasNext()) { + i.next(); + writeStartTag(DT_othermeta); + xmlWriter().writeAttribute("name",i.key()); + xmlWriter().writeAttribute("content",i.value()); + } + } } writeEndTag(); // <metadata> writeEndTag(); // <prolog> diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp index 3b1f280..0f85d37 100644 --- a/tools/qdoc3/node.cpp +++ b/tools/qdoc3/node.cpp @@ -858,6 +858,21 @@ void InnerNode::removeRelated(Node *pseudoChild) related.removeAll(pseudoChild); } +/*! \fn bool InnerNode::hasOtherMetadata() const + Returns tru if the other metadata map is not empty. + */ + +/*! + Insert the pair \a name and \a content into the other metadata map. + */ +void insertOtherMetadata(const QString& name, const QString& content) +{ +} + +/*! \fn const QMap<QString, QString>& InnerNode::otherMetadata() cont + Returns the map containing pairs for output as \c {<othermetadata>}. + */ + /*! \class LeafNode */ diff --git a/tools/qdoc3/node.h b/tools/qdoc3/node.h index 92a7c9f..2de2b5a 100644 --- a/tools/qdoc3/node.h +++ b/tools/qdoc3/node.h @@ -274,6 +274,9 @@ class InnerNode : public Node virtual void addPageKeywords(const QString& t) { pageKeywds << t; } virtual bool isAbstract() const { return false; } virtual void setAbstract(bool ) { } + bool hasOtherMetadata() const { return !otherMetadataMap.isEmpty(); } + void insertOtherMetadata(const QString& name, const QString& content); + const QMap<QString, QString>& otherMetadata() const { return otherMetadataMap; } protected: InnerNode(Type type, InnerNode* parent, const QString& name); @@ -297,6 +300,7 @@ class InnerNode : public Node QMap<QString, Node*> childMap; QMap<QString, Node*> primaryFunctionMap; QMap<QString, NodeList> secondaryFunctionMap; + QMap<QString, QString> otherMetadataMap; }; class LeafNode : public Node |