From 1b13f421f1780bef806c5ccf96196c91c3864f04 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Tue, 31 May 2022 11:33:18 +0200 Subject: Fix assert after qtbase change Avoid using high finger ids. Pick-to: 6.3 Task-number: QTBUG-103859 Change-Id: I4be5466b094dec1cc084ecb7ac61448a93c02637 Reviewed-by: Michal Klocek --- tests/auto/widgets/touchinput/tst_touchinput.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/widgets/touchinput/tst_touchinput.cpp b/tests/auto/widgets/touchinput/tst_touchinput.cpp index 957f3e74c..e3ee9f933 100644 --- a/tests/auto/widgets/touchinput/tst_touchinput.cpp +++ b/tests/auto/widgets/touchinput/tst_touchinput.cpp @@ -81,17 +81,17 @@ private: auto target = view.focusProxy(); QPoint p(target->width() / 2, target->height() / 4 * (down ? 3 : 1)); - QTest::touchEvent(target, s_touchDevice).press(42, p, target); + QTest::touchEvent(target, s_touchDevice).press(1, p, target); QSignalSpy spy(view.page(), &QWebEnginePage::scrollPositionChanged); for (int i = 0; i < 3; ++i) { down ? p -= QPoint(5, 15) : p += QPoint(5, 15); QTest::qWait(100); // too fast and events are recognized as fling gesture - QTest::touchEvent(target, s_touchDevice).move(42, p, target); + QTest::touchEvent(target, s_touchDevice).move(1, p, target); spy.wait(); } - QTest::touchEvent(target, s_touchDevice).release(42, p, target); + QTest::touchEvent(target, s_touchDevice).release(1, p, target); } void gesturePinch(bool zoomIn, bool tapOneByOne = false) { @@ -100,10 +100,10 @@ private: auto t1 = p - QPoint(zoomIn ? 50 : 150, 10), t2 = p + QPoint(zoomIn ? 50 : 150, 10); if (tapOneByOne) { - QTest::touchEvent(target, s_touchDevice).press(42, t1, target); - QTest::touchEvent(target, s_touchDevice).stationary(42).press(24, t2, target); + QTest::touchEvent(target, s_touchDevice).press(0, t1, target); + QTest::touchEvent(target, s_touchDevice).stationary(0).press(1, t2, target); } else { - QTest::touchEvent(target, s_touchDevice).press(42, t1, target).press(24, t2, target); + QTest::touchEvent(target, s_touchDevice).press(0, t1, target).press(1, t2, target); } for (int i = 0; i < 3; ++i) { @@ -115,14 +115,14 @@ private: t2 -= QPoint(35, 5); } QTest::qWait(100); // too fast and events are recognized as fling gesture - QTest::touchEvent(target, s_touchDevice).move(24, t1, target).move(42, t2, target); + QTest::touchEvent(target, s_touchDevice).move(1, t1, target).move(0, t2, target); } if (tapOneByOne) { - QTest::touchEvent(target, s_touchDevice).stationary(42).release(24, t2, target); - QTest::touchEvent(target, s_touchDevice).release(42, t1, target); + QTest::touchEvent(target, s_touchDevice).stationary(0).release(1, t2, target); + QTest::touchEvent(target, s_touchDevice).release(0, t1, target); } else { - QTest::touchEvent(target, s_touchDevice).release(42, t1, target).release(24, t2, target); + QTest::touchEvent(target, s_touchDevice).release(0, t1, target).release(1, t2, target); } } -- cgit v1.2.3