summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Boddie <david.boddie@nokia.com>2011-01-19 14:49:41 (GMT)
committerDavid Boddie <david.boddie@nokia.com>2011-01-19 14:49:41 (GMT)
commit59a35a794e433f9526aff72025c0899e76ef362e (patch)
tree95884ba6507730688201d36955614ed68fcdbaea
parent05a678de3f2e4fe67dc1f93a2dee18e197c0e1c0 (diff)
downloadQt-59a35a794e433f9526aff72025c0899e76ef362e.zip
Qt-59a35a794e433f9526aff72025c0899e76ef362e.tar.gz
Qt-59a35a794e433f9526aff72025c0899e76ef362e.tar.bz2
Doc: Fixed QML syntax.
-rw-r--r--doc/src/getting-started/examples.qdoc6
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem.cpp32
-rw-r--r--src/declarative/graphicsitems/qdeclarativepath.cpp6
3 files changed, 27 insertions, 17 deletions
diff --git a/doc/src/getting-started/examples.qdoc b/doc/src/getting-started/examples.qdoc
index 67000e2..296e032 100644
--- a/doc/src/getting-started/examples.qdoc
+++ b/doc/src/getting-started/examples.qdoc
@@ -488,10 +488,12 @@
\image ipc-examples.png
\list
- \o \l{ipc/localfortuneclient}{Local Fortune Client}\raisedaster
- \o \l{ipc/localfortuneserver}{Local Fortune Server}\raisedaster
+ \o \l{ipc/localfortuneclient}{Local Fortune Client}
+ \o \l{ipc/localfortuneserver}{Local Fortune Server}
\o \l{ipc/sharedmemory}{Shared Memory}\raisedaster
\endlist
+
+ Examples marked with an asterisk (*) are fully documented.
*/
/*!
diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp
index 2e3a5a2..7ddf949 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp
@@ -799,10 +799,18 @@ void QDeclarativeKeyNavigationAttached::keyReleased(QKeyEvent *event, bool post)
This example forwards key events to two lists:
\qml
- ListView { id: list1 ... }
- ListView { id: list2 ... }
- Keys.forwardTo: [list1, list2]
- focus: true
+ Item {
+ ListView {
+ id: list1
+ // ...
+ }
+ ListView {
+ id: list2
+ // ...
+ }
+ Keys.forwardTo: [list1, list2]
+ focus: true
+ }
\endqml
*/
@@ -2542,14 +2550,14 @@ QDeclarativeListProperty<QDeclarativeTransition> QDeclarativeItemPrivate::transi
This property is often used in scripts to change between states. For
example:
- \qml
- function toggle() {
- if (button.state == 'On')
- button.state = 'Off';
- else
- button.state = 'On';
- }
- \endqml
+ \js
+ function toggle() {
+ if (button.state == 'On')
+ button.state = 'Off';
+ else
+ button.state = 'On';
+ }
+ \endjs
If the item is in its base state (i.e. no explicit state has been
set), \c state will be a blank string. Likewise, you can return an
diff --git a/src/declarative/graphicsitems/qdeclarativepath.cpp b/src/declarative/graphicsitems/qdeclarativepath.cpp
index bc395d2..48e3f66 100644
--- a/src/declarative/graphicsitems/qdeclarativepath.cpp
+++ b/src/declarative/graphicsitems/qdeclarativepath.cpp
@@ -845,7 +845,7 @@ void QDeclarativePathCubic::addToPath(QPainterPath &path)
\o
\qml
PathView {
- ...
+ // ...
Path {
startX: 20; startY: 0
PathQuad { x: 50; y: 80; controlX: 0; controlY: 80 }
@@ -859,7 +859,7 @@ void QDeclarativePathCubic::addToPath(QPainterPath &path)
\o
\qml
PathView {
- ...
+ // ...
Path {
startX: 20; startY: 0
PathQuad { x: 50; y: 80; controlX: 0; controlY: 80 }
@@ -892,7 +892,7 @@ void QDeclarativePathCubic::addToPath(QPainterPath &path)
\qml
PathView {
- ...
+ // ...
Path {
startX: 0; startY: 0
PathLine { x:100; y: 0; }