Fix tst_QQuickPinchArea::cancel
The cancel event must have the device set, otherwise it may not be delivered properly. Change-Id: I7f7899fdbfd8fd68e9e19bcd043a46ddb31516cd Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
This commit is contained in:
parent
52c66e85f0
commit
ed054acb9c
|
@ -511,6 +511,7 @@ void tst_QQuickPinchArea::cancel()
|
|||
QCOMPARE(blackRect->scale(), 1.5);
|
||||
|
||||
QTouchEvent cancelEvent(QEvent::TouchCancel);
|
||||
cancelEvent.setDevice(device);
|
||||
QCoreApplication::sendEvent(window, &cancelEvent);
|
||||
QQuickTouchUtils::flush(window);
|
||||
|
||||
|
|
Loading…
Reference in New Issue