diff options
Diffstat (limited to 'src/qml/doc')
5 files changed, 10 insertions, 10 deletions
diff --git a/src/qml/doc/snippets/qml/events.qml b/src/qml/doc/snippets/qml/events.qml index f437e32890..d29be5ebd2 100644 --- a/src/qml/doc/snippets/qml/events.qml +++ b/src/qml/doc/snippets/qml/events.qml @@ -66,7 +66,7 @@ Rectangle { //! [signal handler declaration] onTrigger: console.log("trigger signal emitted") -onSend: { +onSend: (notice)=> { console.log("send signal emitted with notice: " + notice) } @@ -90,7 +90,7 @@ Rectangle { signal send(person: string, notice: string) - onSend: { + onSend: (person, notice)=> { console.log("For " + person + ", the notice is: " + notice) } @@ -103,7 +103,7 @@ Rectangle { id: relay signal send(person: string, notice: string) - onSend: console.log("Send signal to: " + person + ", " + notice) + onSend: (person, notice)=> console.log("Send signal to: " + person + ", " + notice) Component.onCompleted: { relay.send.connect(sendToPost) diff --git a/src/qml/doc/src/cppintegration/exposecppattributes.qdoc b/src/qml/doc/src/cppintegration/exposecppattributes.qdoc index 5c53989cbb..618ed1e334 100644 --- a/src/qml/doc/src/cppintegration/exposecppattributes.qdoc +++ b/src/qml/doc/src/cppintegration/exposecppattributes.qdoc @@ -498,7 +498,7 @@ value: \qml MessageBoard { - onNewMessagePosted: console.log("New message received:", subject) + onNewMessagePosted: (subject)=> console.log("New message received:", subject) } \endqml diff --git a/src/qml/doc/src/qmllanguageref/documents/definetypes.qdoc b/src/qml/doc/src/qmllanguageref/documents/definetypes.qdoc index a4119ff793..718b0c25ac 100644 --- a/src/qml/doc/src/qmllanguageref/documents/definetypes.qdoc +++ b/src/qml/doc/src/qmllanguageref/documents/definetypes.qdoc @@ -208,7 +208,7 @@ Rectangle { MouseArea { id: mouseArea anchors.fill: parent - onClicked: root.buttonClicked(mouse.x, mouse.y) + onClicked: (mouse)=> root.buttonClicked(mouse.x, mouse.y) } } \endqml @@ -224,7 +224,7 @@ import QtQuick 2.0 SquareButton { id: squareButton - onButtonClicked: { + onButtonClicked: (xPos, yPos)=> { console.log("Clicked", xPos, yPos) randomizeColor() } diff --git a/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc b/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc index ecfef2e04f..787e7b920b 100644 --- a/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc +++ b/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc @@ -852,8 +852,8 @@ Rectangle { MouseArea { anchors.fill: parent - onPressed: root.activated(mouse.x, mouse.y) onReleased: root.deactivated() + onPressed: (mouse)=> root.activated(mouse.x, mouse.y) } } \endqml @@ -865,8 +865,8 @@ provided by the client: \qml // myapplication.qml SquareButton { - onActivated: console.log("Activated at " + xPosition + "," + yPosition) onDeactivated: console.log("Deactivated!") + onActivated: (xPosition, yPosition)=> console.log("Activated at " + xPosition + "," + yPosition) } \endqml @@ -954,7 +954,7 @@ Item { MouseArea { anchors.fill: parent - onClicked: label.moveTo(mouse.x, mouse.y) + onClicked: (mouse)=> label.moveTo(mouse.x, mouse.y) } Text { diff --git a/src/qml/doc/src/qmllanguageref/syntax/signals.qdoc b/src/qml/doc/src/qmllanguageref/syntax/signals.qdoc index dd71347b2a..1c13636689 100644 --- a/src/qml/doc/src/qmllanguageref/syntax/signals.qdoc +++ b/src/qml/doc/src/qmllanguageref/syntax/signals.qdoc @@ -220,7 +220,7 @@ Now any objects of the \c SquareButton can connect to the \c activated signal us \qml // myapplication.qml SquareButton { - onActivated: console.log("Activated at " + xPosition + "," + yPosition) + onActivated: (xPosition, yPosition)=> console.log("Activated at " + xPosition + "," + yPosition) } \endqml |