diff options
author | Ulf Hermann <[email protected]> | 2021-02-12 08:53:00 +0100 |
---|---|---|
committer | Ulf Hermann <[email protected]> | 2021-02-12 10:30:20 +0000 |
commit | 4cc91a6a0e4f9063233a4d6554ae64855cf99c14 (patch) | |
tree | 89175c0d09b16926a95c3b1239f73971beacf5bb /examples/quick/particles | |
parent | eaa9993682f02ef0420ec49b816da27db3ca00c2 (diff) |
Use functions as signal handlers when accessing parameters
Injected signal handlers are bad practice because they aren't declared.
Pick-to: 6.1
Task-number: QTBUG-89943
Change-Id: I3a691f68342a199bd63034637aa7ed438e3a037b
Reviewed-by: Fabian Kosmale <[email protected]>
Diffstat (limited to 'examples/quick/particles')
3 files changed, 3 insertions, 3 deletions
diff --git a/examples/quick/particles/system/content/dynamicemitters.qml b/examples/quick/particles/system/content/dynamicemitters.qml index 226e6de870..8eb87d2baa 100644 --- a/examples/quick/particles/system/content/dynamicemitters.qml +++ b/examples/quick/particles/system/content/dynamicemitters.qml @@ -138,7 +138,7 @@ Rectangle { } MouseArea { anchors.fill: parent - onClicked: customEmit(mouse.x, mouse.y); + onClicked: (mouse)=> customEmit(mouse.x, mouse.y); } Text { diff --git a/examples/quick/particles/system/content/startstop.qml b/examples/quick/particles/system/content/startstop.qml index cf9ad3d79d..a9ef7285aa 100644 --- a/examples/quick/particles/system/content/startstop.qml +++ b/examples/quick/particles/system/content/startstop.qml @@ -63,7 +63,7 @@ Rectangle { MouseArea { anchors.fill: parent acceptedButtons: Qt.LeftButton | Qt.RightButton - onClicked: { + onClicked: (mouse) => { if (mouse.button == Qt.LeftButton) particles.running = !particles.running else diff --git a/examples/quick/particles/system/content/timedgroupchanges.qml b/examples/quick/particles/system/content/timedgroupchanges.qml index 9865d3294e..cab992f898 100644 --- a/examples/quick/particles/system/content/timedgroupchanges.qml +++ b/examples/quick/particles/system/content/timedgroupchanges.qml @@ -88,7 +88,7 @@ Rectangle { duration: 1000 Affector { once: true - onAffected: worksEmitter.burst(400,x,y) + onAffected: (x, y)=> worksEmitter.burst(400,x,y) } } //! [2] |