aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml')
-rw-r--r--src/qml/doc/snippets/qml/events.qml6
-rw-r--r--src/qml/doc/src/cppintegration/exposecppattributes.qdoc2
-rw-r--r--src/qml/doc/src/qmllanguageref/documents/definetypes.qdoc4
-rw-r--r--src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc6
-rw-r--r--src/qml/doc/src/qmllanguageref/syntax/signals.qdoc2
-rw-r--r--src/qml/types/qqmlconnections.cpp2
6 files changed, 11 insertions, 11 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
diff --git a/src/qml/types/qqmlconnections.cpp b/src/qml/types/qqmlconnections.cpp
index 676c15e01f..7767909169 100644
--- a/src/qml/types/qqmlconnections.cpp
+++ b/src/qml/types/qqmlconnections.cpp
@@ -88,7 +88,7 @@ public:
\qml
MouseArea {
- onClicked: { foo(parameters) }
+ onClicked: (mouse)=> { foo(mouse) }
}
\endqml