aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/auto/controls/data/tst_swipedelegate.qml8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/controls/data/tst_swipedelegate.qml b/tests/auto/controls/data/tst_swipedelegate.qml
index 16cfea14..21bb1a37 100644
--- a/tests/auto/controls/data/tst_swipedelegate.qml
+++ b/tests/auto/controls/data/tst_swipedelegate.qml
@@ -304,7 +304,7 @@ TestCase {
var control = swipeDelegateComponent.createObject(testCase);
verify(control);
- var overDragDistance = dragDistance * 1.1;
+ var overDragDistance = Math.round(dragDistance * 1.1);
mouseSignalSequenceSpy.target = control;
mouseSignalSequenceSpy.expectedSequence = [["pressedChanged", { "pressed": true }], "pressed"];
@@ -433,7 +433,7 @@ TestCase {
var control = swipeDelegateComponent.createObject(testCase);
verify(control);
- var distance = dragDistance * 1.1;
+ var distance = Math.round(dragDistance * 1.1);
if (distance >= control.width / 2)
skip("This test requires a startDragDistance that is less than half the width of the control");
@@ -826,7 +826,7 @@ TestCase {
control.swipe.left = smallLeftComponent;
// Ensure that the position is scaled to the width of the currently visible delegate.
- var overDragDistance = dragDistance * 1.1;
+ var overDragDistance = Math.round(dragDistance * 1.1);
mousePress(control, control.width / 2, control.height / 2, Qt.LeftButton);
mouseMove(control, control.width / 2 + overDragDistance, control.height / 2, Qt.LeftButton);
verify(control.swipe.leftItem);
@@ -885,7 +885,7 @@ TestCase {
mousePress(control, control.swipe.leftItem.width, control.height / 2, Qt.LeftButton);
compare(leftVisibleSpy.count, 0);
compare(rightVisibleSpy.count, 0);
- var newX = control.swipe.leftItem.width - dragDistance * 1.1;
+ var newX = control.swipe.leftItem.width - Math.round(dragDistance * 1.1);
mouseMove(control, newX, control.height / 2, Qt.LeftButton, Qt.LeftButton);
compare(leftVisibleSpy.count, 0);
compare(rightVisibleSpy.count, 0);