diff options
author | Martin Jones <martin.jones@nokia.com> | 2009-11-25 06:28:38 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2009-11-25 06:28:38 (GMT) |
commit | b74e226c09bc37043a06b24029e0e22e4f3cdd16 (patch) | |
tree | 11bd335cd176eac754c5ea5af8ae41cec74d22c0 | |
parent | 1c9dcb09b79d77bc7d4958e1393437597892bb0b (diff) | |
download | Qt-b74e226c09bc37043a06b24029e0e22e4f3cdd16.zip Qt-b74e226c09bc37043a06b24029e0e22e4f3cdd16.tar.gz Qt-b74e226c09bc37043a06b24029e0e22e4f3cdd16.tar.bz2 |
Small doc fixes.
-rw-r--r-- | doc/src/declarative/advtutorial2.qdoc | 2 | ||||
-rw-r--r-- | doc/src/declarative/ecmascriptblocks.qdoc | 4 | ||||
-rw-r--r-- | doc/src/declarative/extending.qdoc | 2 | ||||
-rw-r--r-- | doc/src/declarative/focus.qdoc | 4 | ||||
-rw-r--r-- | doc/src/declarative/globalobject.qdoc | 2 | ||||
-rw-r--r-- | doc/src/declarative/qmlintro.qdoc | 6 | ||||
-rw-r--r-- | src/declarative/graphicsitems/qmlgraphicsitem.cpp | 18 | ||||
-rw-r--r-- | src/declarative/qml/qmlcomponent.cpp | 4 | ||||
-rw-r--r-- | src/declarative/qml/qmlscript.cpp | 4 | ||||
-rw-r--r-- | src/declarative/qml/qmlscriptstring.cpp | 4 |
10 files changed, 27 insertions, 23 deletions
diff --git a/doc/src/declarative/advtutorial2.qdoc b/doc/src/declarative/advtutorial2.qdoc index 40a760d..dcc7c70 100644 --- a/doc/src/declarative/advtutorial2.qdoc +++ b/doc/src/declarative/advtutorial2.qdoc @@ -93,7 +93,7 @@ To hook this code up to the \e{New Game} button, you alter it as below: \snippet declarative/tutorials/samegame/samegame2/samegame.qml 1 -We have just replaced the \c{onClicked: print("Implement me!")} with \c{onClicked: initBoard()}. +We have just replaced the \c{onClicked: console.log("Implement me!")} with \c{onClicked: initBoard()}. Note that in order to have the function available, you'll need to include the script in the main file, by adding a script element to it. diff --git a/doc/src/declarative/ecmascriptblocks.qdoc b/doc/src/declarative/ecmascriptblocks.qdoc index 815c68c..6ee5a8e 100644 --- a/doc/src/declarative/ecmascriptblocks.qdoc +++ b/doc/src/declarative/ecmascriptblocks.qdoc @@ -168,7 +168,7 @@ is illegal in QML. // Illegal modification of undeclared variable a = 1; for (var ii = 1; ii < 10; ++ii) a = a * ii; -print("Result: " + a); + console.log("Result: " + a); \endcode It can be trivially modified to this legal code. @@ -176,7 +176,7 @@ It can be trivially modified to this legal code. \code var a = 1; for (var ii = 1; ii < 10; ++ii) a = a * ii; -print("Result: " + a); + console.log("Result: " + a); \endcode Any attempt to modify the global object - either implicitly or explicitly - will diff --git a/doc/src/declarative/extending.qdoc b/doc/src/declarative/extending.qdoc index 0233aa7..056b8ab 100644 --- a/doc/src/declarative/extending.qdoc +++ b/doc/src/declarative/extending.qdoc @@ -845,7 +845,7 @@ This example adds a new method that behaves like a child: \code Item { function say(text) { - print("You said " + text); + console.log("You said " + text); } } \endcode diff --git a/doc/src/declarative/focus.qdoc b/doc/src/declarative/focus.qdoc index 924f590..46bfc38 100644 --- a/doc/src/declarative/focus.qdoc +++ b/doc/src/declarative/focus.qdoc @@ -67,7 +67,7 @@ item and thus subsequently be \l {QEvent::ignore()}{ignored}. \code Item { Item { - Keys.onPressed: if (event.key == Qt.Key_A) { print('Key A was pressed'); event.accepted = true } + Keys.onPressed: if (event.key == Qt.Key_A) { console.log('Key A was pressed'); event.accepted = true } Rectangle {} } } @@ -307,7 +307,7 @@ Rectangle { Text { focus: true text: name - Keys.onReturnPressed: print(name) + Keys.onReturnPressed: console.log(name) } } } diff --git a/doc/src/declarative/globalobject.qdoc b/doc/src/declarative/globalobject.qdoc index e3c8b9a..3eadec2 100644 --- a/doc/src/declarative/globalobject.qdoc +++ b/doc/src/declarative/globalobject.qdoc @@ -182,7 +182,7 @@ such as ListView, \l Repeater and \l Loader. sprite = component.createObject(); if(sprite == 0){ // Error Handling - print(component.errorsString()); + console.log(component.errorsString()); }else{ sprite.parent = page; sprite.x = 200; diff --git a/doc/src/declarative/qmlintro.qdoc b/doc/src/declarative/qmlintro.qdoc index 78462db..76d915f 100644 --- a/doc/src/declarative/qmlintro.qdoc +++ b/doc/src/declarative/qmlintro.qdoc @@ -311,7 +311,7 @@ any visual Item, for example: \code Item { focus: true - Keys.onSelectPressed: print("Selected") + Keys.onSelectPressed: console.log("Selected") } \endcode @@ -323,7 +323,7 @@ and click: \code MouseRegion { - onPressed: print("mouse button pressed") + onPressed: console.log("mouse button pressed") } \endcode @@ -335,7 +335,7 @@ the MouseRegion onPressed signal handler has a \e mouse parameter: \code MouseRegion { acceptedButtons: Qt.LeftButton | Qt.RightButton - onPressed: if (mouse.button == Qt.RightButton) print("Right mouse button pressed") + onPressed: if (mouse.button == Qt.RightButton) console.log("Right mouse button pressed") } \endcode diff --git a/src/declarative/graphicsitems/qmlgraphicsitem.cpp b/src/declarative/graphicsitems/qmlgraphicsitem.cpp index 263aea5..5b4f1f1 100644 --- a/src/declarative/graphicsitems/qmlgraphicsitem.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsitem.cpp @@ -168,7 +168,7 @@ QML_DEFINE_TYPE(Qt,4,6,Rotation,QGraphicsRotation) \qmlproperty real Rotation::axis.z The axis to rotate around. For simple (2D) rotation around a point, you do not need to specify an axis, - as the default axis is the z axis (\c{ axis { x: 0; y: 0; z: 0 } }). + as the default axis is the z axis (\c{ axis { x: 0; y: 0; z: 1 } }). For a typical 3D-like rotation you will usually specify both the origin and the axis. @@ -656,7 +656,7 @@ void QmlGraphicsKeyNavigationAttached::keyReleased(QKeyEvent *event) focus: true Keys.onPressed: { if (event.key == Qt.Key_Left) { - print("move left"); + console.log("move left"); event.accepted = true; } } @@ -670,7 +670,7 @@ void QmlGraphicsKeyNavigationAttached::keyReleased(QKeyEvent *event) \code Item { focus: true - Keys.onLeftPressed: print("move left") + Keys.onLeftPressed: console.log("move left") } \endcode @@ -1359,11 +1359,11 @@ QmlGraphicsKeysAttached *QmlGraphicsKeysAttached::qmlAttachedProperties(QObject focus: true Keys.onPressed: { if (event.key == Qt.Key_Left) { - print("move left"); + console.log("move left"); event.accepted = true; } } - Keys.onSelectPressed: print("Selected"); + Keys.onSelectPressed: console.log("Selected"); } \endqml @@ -1943,8 +1943,8 @@ void QmlGraphicsItem::setClip(bool c) Whether the item is visible. By default this is true. - \note visible is not linked to actual visibility; if you item - goes off screen, or the opacity changes to 0, etc this will + \note visible is not linked to actual visibility; if an item + moves off screen, or the opacity changes to 0, this will not affect the visible property. */ @@ -2930,6 +2930,8 @@ bool QmlGraphicsItem::heightValid() const \qmlproperty bool Item::wantsFocus This property indicates whether the item has has an active focus request. + + \sa {qmlfocus}{Keyboard Focus} */ /*! \internal */ @@ -2942,6 +2944,8 @@ bool QmlGraphicsItem::wantsFocus() const \qmlproperty bool Item::focus This property indicates whether the item has keyboard input focus. Set this property to true to request focus. + + \sa {qmlfocus}{Keyboard Focus} */ /*! \internal */ diff --git a/src/declarative/qml/qmlcomponent.cpp b/src/declarative/qml/qmlcomponent.cpp index 7f8836a..5f8b816 100644 --- a/src/declarative/qml/qmlcomponent.cpp +++ b/src/declarative/qml/qmlcomponent.cpp @@ -112,9 +112,9 @@ Item { \qml Rectangle { - Component.onCompleted: print("Completed Running!") + Component.onCompleted: console.log("Completed Running!") Rectangle { - Component.onCompleted: print("Nested Completed Running!") + Component.onCompleted: console.log("Nested Completed Running!") } } \endqml diff --git a/src/declarative/qml/qmlscript.cpp b/src/declarative/qml/qmlscript.cpp index eb0b858..ba62898 100644 --- a/src/declarative/qml/qmlscript.cpp +++ b/src/declarative/qml/qmlscript.cpp @@ -54,8 +54,8 @@ \qml Script { function debugMyComponent() { - print(text.text); - print(otherinterestingitem.property); + console.log(text.text); + console.log(otherinterestingitem.property); } } MouseRegion { onClicked: debugMyComponent() } diff --git a/src/declarative/qml/qmlscriptstring.cpp b/src/declarative/qml/qmlscriptstring.cpp index 6f669d5..1ccad53 100644 --- a/src/declarative/qml/qmlscriptstring.cpp +++ b/src/declarative/qml/qmlscriptstring.cpp @@ -60,12 +60,12 @@ public: The QmlScriptString is used by properties that want to accept a script "assignment" from QML. Normally, the following code would result in a binding being established for the \c script -property. If the property had a type of QmlScriptString, the script - \e {print(1921)} - itself +property. If the property had a type of QmlScriptString, the script - \e {console.log(1921)} - itself would be passed to the property and it could choose how to handle it. \code MyType { - script: print(1921) + script: console.log(1921) } \endcode */ |