aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2020-11-03 22:04:12 +0100
committerShawn Rutledge <shawn.rutledge@qt.io>2020-11-03 22:19:32 +0100
commit8ae632bbbc12f9751c8a55692687aff73ca01d77 (patch)
treedb2a6d96a5bcb13fa41248db3a948beeedf9e0eb /tests
parent73991414361cf04c0d54904cc9cb661f073e1a47 (diff)
Speed up tst_QQuickListView; round coordinate display
Change-Id: I149258c69bac867a5d031b8d460e0192762fb8a5 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/quick/qquicklistview/data/snapOneItem.qml13
-rw-r--r--tests/auto/quick/qquicklistview/data/snapToItem.qml5
2 files changed, 15 insertions, 3 deletions
diff --git a/tests/auto/quick/qquicklistview/data/snapOneItem.qml b/tests/auto/quick/qquicklistview/data/snapOneItem.qml
index d67d8040ca..24ff9cdf53 100644
--- a/tests/auto/quick/qquicklistview/data/snapOneItem.qml
+++ b/tests/auto/quick/qquicklistview/data/snapOneItem.qml
@@ -36,14 +36,23 @@ Rectangle {
highlightRangeMode: ListView.StrictlyEnforceRange
// highlightRangeMode: ListView.NoHighlightRange
highlight: Rectangle { width: 200; height: 200; color: "yellow" }
- flickDeceleration: 200 // encourages long flick
model: 4
delegate: myDelegate
+
+ // speed up test runs
+ flickDeceleration: 5000
+ rebound: Transition {
+ NumberAnimation {
+ properties: "x,y"
+ duration: 30
+ easing.type: Easing.OutBounce
+ }
+ }
}
Text {
anchors.right: parent.right
anchors.bottom: parent.bottom
- text: list.contentX + ", " + list.contentY
+ text: list.contentX.toFixed(1) + ", " + list.contentY.toFixed(1)
}
}
diff --git a/tests/auto/quick/qquicklistview/data/snapToItem.qml b/tests/auto/quick/qquicklistview/data/snapToItem.qml
index 91d31adfc7..a41391c5d6 100644
--- a/tests/auto/quick/qquicklistview/data/snapToItem.qml
+++ b/tests/auto/quick/qquicklistview/data/snapToItem.qml
@@ -39,11 +39,14 @@ Rectangle {
highlight: Rectangle { width: 80; height: 80; color: "yellow" }
model: 10
delegate: myDelegate
+
+ // speed up test runs
+ flickDeceleration: 5000
}
Text {
anchors.right: parent.right
anchors.bottom: parent.bottom
- text: list.contentX + ", " + list.contentY
+ text: list.contentX.toFixed(1) + ", " + list.contentY.toFixed(1)
}
}