-
Bug
-
Resolution: Unresolved
-
P1: Critical
-
None
-
6.0, 6.10.0
-
None
QTouchEventSequence& QTouchEventSequence::stationary(int touchId) { auto &p = pointOrPreviousPoint(touchId); QMutableEventPoint::setState(p, QEventPoint::State::Stationary); return *this; } QEventPoint &QTouchEventSequence::pointOrPreviousPoint(int touchId) { if (!points.contains(touchId)) { qDebug() << " wasn't there: stashing"; if (previousPoints.contains(touchId)) points[touchId] = previousPoints.value(touchId); else points[touchId] = QEventPoint(touchId); } qDebug() << touchId << points[touchId]; return points[touchId]; }
Now if we take tst_HoverHandler::twoHandlersTwoTouches() for example:
QTest::touchEvent(&window, touchscreen.get()).press(0, pl, &window); QTest::touchEvent(&window, touchscreen.get()).stationary(0).press(1, pr, &window);
the "wasn't there: stashing" output occurs when stationary() is called, but not before; and the stationary QEventPoint gets delivered with incorrect global position and negative scene position.
I can do special things with Stationary points in Qt Quick, and sometimes it's an optimization too: but doing it just to mask problems in QTestlib is kindof silly.