aboutsummaryrefslogtreecommitdiffstats
path: root/examples/qml
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2021-02-12 08:53:00 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-02-12 16:18:28 +0000
commit8784a2778063cf928b27a908f6580ed37cb4035d (patch)
tree5a0871bc6fdd795d7971bc43c3811ee467d4ff38 /examples/qml
parent0e92e0bd6e7209ad491472b3928840ad78c5371a (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/qml')
-rw-r--r--examples/qml/dynamicscene/content/PaletteItem.qml6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/qml/dynamicscene/content/PaletteItem.qml b/examples/qml/dynamicscene/content/PaletteItem.qml
index 72c4e6a27f..ca734a5dba 100644
--- a/examples/qml/dynamicscene/content/PaletteItem.qml
+++ b/examples/qml/dynamicscene/content/PaletteItem.qml
@@ -62,8 +62,8 @@ Image {
MouseArea {
anchors.fill: parent
- onPressed: Code.startDrag(mouse);
- onPositionChanged: Code.continueDrag(mouse);
- onReleased: Code.endDrag(mouse);
+ onPressed: (mouse)=> Code.startDrag(mouse);
+ onPositionChanged: (mouse)=> Code.continueDrag(mouse);
+ onReleased: (mouse)=> Code.endDrag(mouse);
}
}