From 8ae632bbbc12f9751c8a55692687aff73ca01d77 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Tue, 3 Nov 2020 22:04:12 +0100 Subject: Speed up tst_QQuickListView; round coordinate display Change-Id: I149258c69bac867a5d031b8d460e0192762fb8a5 Reviewed-by: Shawn Rutledge --- tests/auto/quick/qquicklistview/data/snapOneItem.qml | 13 +++++++++++-- tests/auto/quick/qquicklistview/data/snapToItem.qml | 5 ++++- 2 files changed, 15 insertions(+), 3 deletions(-) (limited to 'tests/auto/quick') 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) } } -- cgit v1.2.3