summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@qt.io>2017-08-04 14:49:11 +0200
committerPaolo Angelelli <paolo.angelelli@qt.io>2017-08-08 12:16:06 +0000
commit016d3992e81fc351c13f9e747fa5798dc176e6c2 (patch)
treef5cc5d4f8e374f933ba39868f5cf8c192432e9c8
parentb54c72e62b4deec004c88b40960a947cd0d1c3fe (diff)
downloadqtlocation-016d3992e81fc351c13f9e747fa5798dc176e6c2.tar.gz
Fix MapFlick::test_flick_diagonal autotest
init() is currently setting zoomLevel to 0. This prevents the map from flicking diagonally as there's no room for that when the map is fully visible vertically. This test is currently passing in CI for unclear reasons, but it's failing locally. Change-Id: I0bb7c703a6cd2d4b5f440ce629c3933cf41268f6 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
-rw-r--r--tests/auto/declarative_ui/tst_map_flick.qml12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/auto/declarative_ui/tst_map_flick.qml b/tests/auto/declarative_ui/tst_map_flick.qml
index 84ffa429..c153411f 100644
--- a/tests/auto/declarative_ui/tst_map_flick.qml
+++ b/tests/auto/declarative_ui/tst_map_flick.qml
@@ -105,7 +105,7 @@ Item {
map.gesture.enabled = true
map.gesture.panEnabled = true
map.gesture.flickDeceleration = 500
- map.zoomLevel = 0
+ map.zoomLevel = 9 // or flicking diagonally won't work
map.disableOnPanStartedWithNoGesture = false
map.disableOnFlickStartedWithNoGesture = false
map.disableOnPanStartedWithDisabled = false
@@ -238,12 +238,12 @@ Item {
{
map.center.latitude = 50
map.center.longitude = 50
- mousePress(page, 2, 2)
- var pos;
- for (var i = 0; i < 50; i += 5) {
+ var pos = 5
+ mousePress(page, pos, pos)
+ for (var i = pos; i < 50; i += 5) {
+ pos = i
wait(20)
- mouseMove(page, i, i, 0, Qt.LeftButton);
- pos = i;
+ mouseMove(page, pos, pos, 0, Qt.LeftButton);
}
mouseRelease(page, pos, pos)
verify(map.center.latitude > 50)