summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2022-05-31 11:33:18 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2022-05-31 13:47:15 +0200
commit1b13f421f1780bef806c5ccf96196c91c3864f04 (patch)
tree948ab6cb0c922b9a58507673350ae6fe9af25fd8 /tests/auto
parente4c4f23512c7bbb0f6791295554da548ed5a2e89 (diff)
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 <michal.klocek@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/widgets/touchinput/tst_touchinput.cpp20
1 files changed, 10 insertions, 10 deletions
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);
}
}