summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKari Oikarinen <kari.oikarinen@qt.io>2018-02-20 16:44:06 +0200
committerKari Oikarinen <kari.oikarinen@qt.io>2018-02-21 11:01:43 +0000
commitd458bd47106dd849e6cf72b97a27f871735e4eed (patch)
tree94ae2c99401a942de743037a318fc555c859bd94 /tests
parent31c3ce8ee7d53fad07234ea4b3ba4875b826dd21 (diff)
downloadqtlocation-d458bd47106dd849e6cf72b97a27f871735e4eed.tar.gz
Use mouse instead of arguments[0] in signal handlersv5.11.0-beta1
Couldn't reproduce the bug that was the explained cause and based on the bug comments it hasn't been reproducible in Qt 5.2+ in 2014 either. Task-number: QTBUG-36560 Change-Id: I198bbba5a3f00bf49a7efbfde30af1696011efd8 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative_ui/tst_map_mouse.qml39
1 files changed, 18 insertions, 21 deletions
diff --git a/tests/auto/declarative_ui/tst_map_mouse.qml b/tests/auto/declarative_ui/tst_map_mouse.qml
index b3f265a0..07ef949f 100644
--- a/tests/auto/declarative_ui/tst_map_mouse.qml
+++ b/tests/auto/declarative_ui/tst_map_mouse.qml
@@ -107,13 +107,12 @@ Item {
preventStealing: true
- // The following signal handlers use arguments[0] instead of mouse due to QTBUG-36560
- onClicked: page.setMouseData(mouseUpper, arguments[0])
- onDoubleClicked: page.setMouseData(mouseUpper, arguments[0])
- onPressed: page.setMouseData(mouseUpper, arguments[0])
- onReleased: page.setMouseData(mouseUpper, arguments[0])
- onPositionChanged: page.setMouseData(mouseUpper, arguments[0])
- onPressAndHold: page.setMouseData(mouseUpper, arguments[0])
+ onClicked: page.setMouseData(mouseUpper, mouse)
+ onDoubleClicked: page.setMouseData(mouseUpper, mouse)
+ onPressed: page.setMouseData(mouseUpper, mouse)
+ onReleased: page.setMouseData(mouseUpper, mouse)
+ onPositionChanged: page.setMouseData(mouseUpper, mouse)
+ onPressAndHold: page.setMouseData(mouseUpper, mouse)
}
MouseArea {
id: mouseLower
@@ -128,13 +127,12 @@ Item {
property bool lastIsClick: false
property bool lastAccepted: false;
- // The following signal handlers use arguments[0] instead of mouse due to QTBUG-36560
- onClicked: page.setMouseData(mouseLower, arguments[0])
- onDoubleClicked: page.setMouseData(mouseLower, arguments[0])
- onPressed: page.setMouseData(mouseLower, arguments[0])
- onReleased: page.setMouseData(mouseLower, arguments[0])
- onPositionChanged: page.setMouseData(mouseLower, arguments[0])
- onPressAndHold: page.setMouseData(mouseLower, arguments[0])
+ onClicked: page.setMouseData(mouseLower, mouse)
+ onDoubleClicked: page.setMouseData(mouseLower, mouse)
+ onPressed: page.setMouseData(mouseLower, mouse)
+ onReleased: page.setMouseData(mouseLower, mouse)
+ onPositionChanged: page.setMouseData(mouseLower, mouse)
+ onPressAndHold: page.setMouseData(mouseLower, mouse)
}
MouseArea {
id: mouseOverlapper
@@ -149,13 +147,12 @@ Item {
property bool lastIsClick: false
property bool lastAccepted: false;
- // The following signal handlers use arguments[0] instead of mouse due to QTBUG-36560
- onClicked: page.setMouseData(mouseOverlapper, arguments[0])
- onDoubleClicked: page.setMouseData(mouseOverlapper, arguments[0])
- onPressed: page.setMouseData(mouseOverlapper, arguments[0])
- onReleased: page.setMouseData(mouseOverlapper, arguments[0])
- onPositionChanged: page.setMouseData(mouseOverlapper, arguments[0])
- onPressAndHold: page.setMouseData(mouseOverlapper, arguments[0])
+ onClicked: page.setMouseData(mouseOverlapper, mouse)
+ onDoubleClicked: page.setMouseData(mouseOverlapper, mouse)
+ onPressed: page.setMouseData(mouseOverlapper, mouse)
+ onReleased: page.setMouseData(mouseOverlapper, mouse)
+ onPositionChanged: page.setMouseData(mouseOverlapper, mouse)
+ onPressAndHold: page.setMouseData(mouseOverlapper, mouse)
}
}