diff options
author | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2015-05-13 17:28:44 +0200 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2015-05-15 09:57:26 +0000 |
commit | 26d172e550fb4df2c23542947ffafd79ea8065fe (patch) | |
tree | 3aff06d2fbffede99a1ba458229d9f2327381538 /tests/auto/quick/qquickwindow/tst_qquickwindow.cpp | |
parent | f98a5ca0c16670390e3b275ce3657dbc295b3dc4 (diff) |
Potentially stabilize tst_qquickwindow::touchEvent_cancel
By moving them well into the item, (50 instead of 10 pixels) there is
less risk of them not being delivered due to bad timing with window
activated.
Since we know that even qWaitForWindowActive sometimes returns before
the final positioning of the window, this is a sensible work-around
until testlib is fixed. In this test we care about the
process of cancelling a touch event, not where.
Change-Id: I74ad29535038995b38c913ddd09f462aa96a034c
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'tests/auto/quick/qquickwindow/tst_qquickwindow.cpp')
-rw-r--r-- | tests/auto/quick/qquickwindow/tst_qquickwindow.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp index 15dab335f0..09c582ee91 100644 --- a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp +++ b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp @@ -761,12 +761,12 @@ void tst_qquickwindow::touchEvent_cancel() item->setPosition(QPointF(50, 50)); item->setSize(QSizeF(150, 150)); - QPointF pos(10, 10); - QTest::touchEvent(window, touchDevice).press(0, item->mapToScene(pos).toPoint(),window); + QPointF pos(50, 50); + QTest::touchEvent(window, touchDevice).press(0, item->mapToScene(pos).toPoint(), window); QCoreApplication::processEvents(); QTRY_COMPARE(item->lastEvent.touchPoints.count(), 1); - TouchEventData d = makeTouchData(QEvent::TouchBegin, window, Qt::TouchPointPressed, makeTouchPoint(item,pos)); + TouchEventData d = makeTouchData(QEvent::TouchBegin, window, Qt::TouchPointPressed, makeTouchPoint(item, pos)); COMPARE_TOUCH_DATA(item->lastEvent, d); item->reset(); |