From 31f3040b2e4ce4570e381ec410f921918205e3db Mon Sep 17 00:00:00 2001 From: Geir Vattekar Date: Mon, 7 Mar 2011 14:21:35 +0100 Subject: Doc: Work on QTranslator::load() Reviewed-by: David Boddie --- src/corelib/kernel/qtranslator.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/corelib/kernel/qtranslator.cpp b/src/corelib/kernel/qtranslator.cpp index d72c1ab..73a32c4 100644 --- a/src/corelib/kernel/qtranslator.cpp +++ b/src/corelib/kernel/qtranslator.cpp @@ -354,10 +354,15 @@ QTranslator::~QTranslator() } /*! - Loads \a filename + \a suffix (".qm" if the \a suffix is - not specified), which may be an absolute file name or relative - to \a directory. Returns true if the translation is successfully - loaded; otherwise returns false. + + Loads \a filename + \a suffix (".qm" if the \a suffix is not + specified), which may be an absolute file name or relative to \a + directory. Returns true if the translation is successfully loaded; + otherwise returns false. + + If \a directory is not specified, the directory of the + application's executable is used (i.e., as + \l{QCoreApplication::}{applicationDirPath()}). The previous contents of this translator object are discarded. -- cgit v0.12 From ea8a4080bfc341785c8852a66c90050f72a58e12 Mon Sep 17 00:00:00 2001 From: Geir Vattekar Date: Mon, 7 Mar 2011 14:28:45 +0100 Subject: Doc: Small correction to QMap iterator docs Task-number: QTBUG-17169 --- src/corelib/tools/qmap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/tools/qmap.cpp b/src/corelib/tools/qmap.cpp index fe53374..2c028af 100644 --- a/src/corelib/tools/qmap.cpp +++ b/src/corelib/tools/qmap.cpp @@ -1073,7 +1073,7 @@ void QMapData::dump() \overload - The prefix -- operator (\c{--i}) makes the preceding item + The postfix -- operator (\c{i--}) makes the preceding item current and returns an iterator pointing to the previously current item. */ -- cgit v0.12 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