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:
Frederik Gladhorn 2016-07-25 23:35:26 +02:00 committed by Frederik Gladhorn
parent 52c66e85f0
commit ed054acb9c
1 changed files with 1 additions and 0 deletions

View File

@ -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);