diff options
author | Jerome Pasion <jerome.pasion@nokia.com> | 2011-03-09 08:19:10 (GMT) |
---|---|---|
committer | Jerome Pasion <jerome.pasion@nokia.com> | 2011-03-09 08:19:10 (GMT) |
commit | 97bc06f9129abdeda2f58dd001b6c5a596e22e41 (patch) | |
tree | 520c4f02a96e750d16c34e67412a92b7fe755073 | |
parent | 133db91952ede661750489d5d0d1eea32cc60994 (diff) | |
parent | a2b2961fb9050c26ef99ebadb642f4178185a31f (diff) | |
download | Qt-97bc06f9129abdeda2f58dd001b6c5a596e22e41.zip Qt-97bc06f9129abdeda2f58dd001b6c5a596e22e41.tar.gz Qt-97bc06f9129abdeda2f58dd001b6c5a596e22e41.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-doc-team into 4.7
-rw-r--r-- | demos/qtdemo/examplecontent.cpp | 6 | ||||
-rw-r--r-- | doc/src/examples/rogue.qdoc | 4 | ||||
-rw-r--r-- | src/corelib/tools/qbytearray.cpp | 2 | ||||
-rw-r--r-- | src/declarative/util/qdeclarativelistmodel.cpp | 2 | ||||
-rw-r--r-- | tools/qdoc3/ditaxmlgenerator.cpp | 31 | ||||
-rw-r--r-- | tools/qdoc3/ditaxmlgenerator.h | 2 |
6 files changed, 36 insertions, 11 deletions
diff --git a/demos/qtdemo/examplecontent.cpp b/demos/qtdemo/examplecontent.cpp index 64737c3..5385259 100644 --- a/demos/qtdemo/examplecontent.cpp +++ b/demos/qtdemo/examplecontent.cpp @@ -83,8 +83,10 @@ QString ExampleContent::loadDescription() int errorLine, errorColumn; QDomDocument exampleDoc; - if (!exampleDoc.setContent(ba, false, &errorMsg, &errorLine, &errorColumn)) { - qDebug() << errorMsg << errorLine << errorColumn; + if (ba.isEmpty()) { + qDebug() << "No documentation found for" << name << "Is the documentation built?"; + } else if (!exampleDoc.setContent(ba, false, &errorMsg, &errorLine, &errorColumn)) { + qDebug() << "Error loading documentation for " << name << ": " << errorMsg << errorLine << errorColumn; } QDomNodeList paragraphs = exampleDoc.elementsByTagName("p"); diff --git a/doc/src/examples/rogue.qdoc b/doc/src/examples/rogue.qdoc index 94539ad..4df0910 100644 --- a/doc/src/examples/rogue.qdoc +++ b/doc/src/examples/rogue.qdoc @@ -190,8 +190,8 @@ \snippet examples/statemachine/rogue/movementtransition.h 2 When \c onTransition() is invoked, we know that we have a - \l{QEvent::}{KeyPress} event with 2, 4, 6, or 8, i.e., the event - is already unwrapped. + \l{QEvent::}{KeyPress} event with 2, 4, 6, or 8, and can ask \c + Window to move the player. \section1 The Roguelike Tradition diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp index 568293d..641f8d5 100644 --- a/src/corelib/tools/qbytearray.cpp +++ b/src/corelib/tools/qbytearray.cpp @@ -1363,7 +1363,7 @@ QByteArray::QByteArray(int size, Qt::Initialization) If \a size is less than the current size, bytes are removed from the end. - \sa size() + \sa size(), truncate() */ void QByteArray::resize(int size) diff --git a/src/declarative/util/qdeclarativelistmodel.cpp b/src/declarative/util/qdeclarativelistmodel.cpp index 159b569..b2739f0 100644 --- a/src/declarative/util/qdeclarativelistmodel.cpp +++ b/src/declarative/util/qdeclarativelistmodel.cpp @@ -143,7 +143,7 @@ QDeclarativeListModelParser::ListInstruction *QDeclarativeListModelParser::ListM \section1 Modifying List Models The content of a ListModel may be created and modified using the clear(), - append(), set() and setProperty() methods. For example: + append(), set(), insert() and setProperty() methods. For example: \snippet doc/src/snippets/declarative/listmodel-modify.qml delegate 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; |