From 07ce2c31c3e020ad7c5ea4d7cc94296b6860adac Mon Sep 17 00:00:00 2001 From: Geir Vattekar Date: Mon, 7 Mar 2011 16:26:19 +0100 Subject: Doc: QtDemo now gives error message when example doc cannot be loaded Task-number: QTBUG-16004 Reviewed-by: Richard Moe Gustavsen --- demos/qtdemo/examplecontent.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 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"); -- cgit v0.12 From c18a068963c524f210c0b8a7472dad78b98a7d80 Mon Sep 17 00:00:00 2001 From: Geir Vattekar Date: Mon, 7 Mar 2011 16:55:16 +0100 Subject: Doc: Small change to ListModel docs Task-number: QTBUG-16948 --- src/declarative/util/qdeclarativelistmodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v0.12 From 17d867ad4dbe34ee8ef93c74432a4cb1e1f1c151 Mon Sep 17 00:00:00 2001 From: Geir Vattekar Date: Mon, 7 Mar 2011 17:21:10 +0100 Subject: Doc: Small change to QByteArray::resize() Task-number: QTBUG-16669 --- src/corelib/tools/qbytearray.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- cgit v0.12 From 25f3fbc516aad3cbd08deaa890a3f5a93582a13b Mon Sep 17 00:00:00 2001 From: Geir Vattekar Date: Mon, 7 Mar 2011 18:05:26 +0100 Subject: Doc: Fixed a doc bug in the Rogue example --- doc/src/examples/rogue.qdoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- cgit v0.12 From 69a5b6f739e514f75a74444313597b40d30ee827 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Wed, 9 Mar 2011 08:47:27 +0100 Subject: qdoc: Added element and its contents to the metadata. --- tools/qdoc3/ditaxmlgenerator.cpp | 31 ++++++++++++++++++++++++++----- tools/qdoc3/ditaxmlgenerator.h | 2 ++ 2 files changed, 28 insertions(+), 5 deletions(-) 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 - \o + \o * \o - \o + \o * \o \o \o @@ -5547,13 +5548,13 @@ void DitaXmlGenerator::writeDitaMap() \o \o \o - \o + \o * \o \o \o \o \o - \o + \o * \o \o \o @@ -5563,6 +5564,8 @@ void DitaXmlGenerator::writeDitaMap() \o \o \endlist + + \node * means the tag has been used. */ void @@ -5610,6 +5613,24 @@ DitaXmlGenerator::writeProlog(const InnerNode* inner, CodeMarker* marker) } xmlWriter().writeCharacters(category); writeEndTag(); // + if (vrm.size() > 0) { + qDebug() << "VRM" << vrm; + writeStartTag(DT_prodinfo); + writeStartTag(DT_prodname); + xmlWriter().writeCharacters(projectDescription); + writeEndTag(); // + 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(); // + writeEndTag(); // + writeEndTag(); // + } writeEndTag(); // writeEndTag(); // } 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; -- cgit v0.12