diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2021-02-12 08:53:00 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-02-12 16:18:28 +0000 |
commit | 8784a2778063cf928b27a908f6580ed37cb4035d (patch) | |
tree | 5a0871bc6fdd795d7971bc43c3811ee467d4ff38 /examples/quick/particles | |
parent | 0e92e0bd6e7209ad491472b3928840ad78c5371a (diff) |
Use functions as signal handlers when accessing parameters
Injected signal handlers are bad practice because they aren't declared.
Task-number: QTBUG-89943
Change-Id: I3a691f68342a199bd63034637aa7ed438e3a037b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 4cc91a6a0e4f9063233a4d6554ae64855cf99c14)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
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] |