summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Boddie <david.boddie@nokia.com>2011-03-27 23:07:04 (GMT)
committerDavid Boddie <david.boddie@nokia.com>2011-03-27 23:07:04 (GMT)
commit8faad8f5e7ddf03b4bf19ef51ddd1ad3c3b5f968 (patch)
tree232e346dba7226f35af80043e072538dba473201
parentacc903853d5ac54d646d324b7386c998bc07d464 (diff)
parentea9f34568acd1286f5ed4e7f2bf760982a4e4579 (diff)
downloadQt-8faad8f5e7ddf03b4bf19ef51ddd1ad3c3b5f968.zip
Qt-8faad8f5e7ddf03b4bf19ef51ddd1ad3c3b5f968.tar.gz
Qt-8faad8f5e7ddf03b4bf19ef51ddd1ad3c3b5f968.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-doc-review into 4.7
Conflicts: doc/src/declarative/dynamicobjects.qdoc
-rw-r--r--doc/src/declarative/dynamicobjects.qdoc14
-rw-r--r--doc/src/declarative/qmlwebkit.qdoc5
-rw-r--r--doc/src/snippets/declarative/webview/webview.qml2
-rw-r--r--tools/qdoc3/helpprojectwriter.cpp5
-rw-r--r--tools/qdoc3/htmlgenerator.cpp2
-rw-r--r--tools/qdoc3/qdoc3.pro2
-rw-r--r--tools/qdoc3/qmlcodeparser.cpp2
7 files changed, 18 insertions, 14 deletions
diff --git a/doc/src/declarative/dynamicobjects.qdoc b/doc/src/declarative/dynamicobjects.qdoc
index 7c10760..90fb715 100644
--- a/doc/src/declarative/dynamicobjects.qdoc
+++ b/doc/src/declarative/dynamicobjects.qdoc
@@ -69,12 +69,14 @@ a \l Component object from this URL.
Once you have a \l Component, you can call its \l {Component::createObject()}{createObject()} method to create an instance of
the component. This function can take one or two arguments:
\list
-\o The first is the parent for the new item. Since graphical items will not appear on the scene without a parent, it is
- recommended that you set the parent this way. However, if you wish to set the parent later you can safely pass \c null to
- this function.
-\o The second is optional and is a script which assigns values to the item's properties during creation. This avoids warnings
- when certain properties have been bound to before they have been set by the code. Additionally, there are small performance
- benefits when instantiating objects in this way.
+\o The first is the parent for the new item. Since graphical items will not appear on the scene without a parent, it is
+ recommended that you set the parent this way. However, if you wish to set the parent later you can safely pass \c null to
+ this function.
+\o The second is optional and is a map of property-value items that define initial any property values for the item.
+ Property values specified by this argument are applied to the object before its creation is finalized, avoiding
+ binding errors that may occur if particular properties must be initialized to enable other property bindings.
+ when certain properties have been bound to before they have been set by the code. Additionally, there are small
+ performance benefits when compared to defining property values and bindings after the object is created.
\endlist
Here is an example. First there is \c Sprite.qml, which defines a simple QML component:
diff --git a/doc/src/declarative/qmlwebkit.qdoc b/doc/src/declarative/qmlwebkit.qdoc
index 354e60a..840f24d 100644
--- a/doc/src/declarative/qmlwebkit.qdoc
+++ b/doc/src/declarative/qmlwebkit.qdoc
@@ -42,14 +42,11 @@ The QtWebKit Module has a QML element, \l{WebView} for displaying web content
from a \c URL.
Import the QtWebKit module before declaring a \c WebView element:
-\qml
-import QtWebKit 1.0
-\endqml
+\snippet doc/src/snippets/declarative/webview/webview.qml import
\section1 Simple Usage
\snippet doc/src/snippets/declarative/webview/webview.qml document
\image webview.png
\sa {Models and Views: WebView Example}{WebView Example}, {QML Web Browser}
-
*/
diff --git a/doc/src/snippets/declarative/webview/webview.qml b/doc/src/snippets/declarative/webview/webview.qml
index c1cef33..a986fab 100644
--- a/doc/src/snippets/declarative/webview/webview.qml
+++ b/doc/src/snippets/declarative/webview/webview.qml
@@ -39,7 +39,9 @@
****************************************************************************/
//! [document]
+//! [import]
import QtWebKit 1.0
+//! [import]
WebView {
url: "http://www.nokia.com"
diff --git a/tools/qdoc3/helpprojectwriter.cpp b/tools/qdoc3/helpprojectwriter.cpp
index 949507f..1c7fcbf 100644
--- a/tools/qdoc3/helpprojectwriter.cpp
+++ b/tools/qdoc3/helpprojectwriter.cpp
@@ -702,6 +702,8 @@ void HelpProjectWriter::generateProject(HelpProject &project)
}
} else {
// Find a contents node and navigate from there, using the NextLink values.
+ QSet<QString> visited;
+
foreach (const Node *node, subproject.nodes) {
QString nextTitle = node->links().value(Node::NextLink).first;
if (!nextTitle.isEmpty() &&
@@ -715,9 +717,10 @@ void HelpProjectWriter::generateProject(HelpProject &project)
while (nextPage) {
writeNode(project, writer, nextPage);
nextTitle = nextPage->links().value(Node::NextLink).first;
- if(nextTitle.isEmpty())
+ if (nextTitle.isEmpty() || visited.contains(nextTitle))
break;
nextPage = const_cast<FakeNode *>(tree->findFakeNodeByTitle(nextTitle));
+ visited.insert(nextTitle);
}
break;
}
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index 3e25cb7..2019e85 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -487,7 +487,7 @@ int HtmlGenerator::generateAtom(const Atom *atom,
case Atom::CaptionRight:
endLink();
if (in_para) {
- out() << "</p\n";
+ out() << "</p>\n";
in_para = false;
}
break;
diff --git a/tools/qdoc3/qdoc3.pro b/tools/qdoc3/qdoc3.pro
index 6f31c60..5b4131f 100644
--- a/tools/qdoc3/qdoc3.pro
+++ b/tools/qdoc3/qdoc3.pro
@@ -113,4 +113,4 @@ qch-docs.CONFIG += no_check_exist directory
QMAKE_EXTRA_TARGETS += html-docs qch-docs
target.path = $$[QT_INSTALL_BINS]
-INSTALLS += target qch-docs
+INSTALLS += target
diff --git a/tools/qdoc3/qmlcodeparser.cpp b/tools/qdoc3/qmlcodeparser.cpp
index 9c1d4ee..93a3ff9 100644
--- a/tools/qdoc3/qmlcodeparser.cpp
+++ b/tools/qdoc3/qmlcodeparser.cpp
@@ -142,7 +142,7 @@ void QmlCodeParser::doneParsingSourceFiles(Tree *tree)
}
/*!
- Returns the set of strings reopresenting the topic commands.
+ Returns the set of strings representing the topic commands.
*/
QSet<QString> QmlCodeParser::topicCommands()
{