Skip to content

Commit

Permalink
Stabilize tst_QApplication::touchEventPropagation
Browse files Browse the repository at this point in the history
CI metrics show that this test was flaky ~38 time in 3 days.
The problem is old: after we get a surface, a window manager can still
decide to re-position the window.
The fix is to simply send the touch event in a position where it is sure
to hit the window (usually the offset is the title bar height).

The blacklisting seems to not have worked, I could reproduce the failure
on a linux/xcb machine.

Change-Id: I5229fe020ba75c984fd3b6c322ad00d769707573
Reviewed-by: Shawn Rutledge <[email protected]>
  • Loading branch information
gladhorn authored and ec1oud committed May 10, 2017
1 parent be0a221 commit 7f80c96
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions tests/auto/widgets/kernel/qapplication/BLACKLIST
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
[quitOnLastWindowClosed]
osx-10.10
[touchEventPropagation]
xcb
Original file line number Diff line number Diff line change
Expand Up @@ -1987,7 +1987,7 @@ void tst_QApplication::touchEventPropagation()
window.show();
QVERIFY(QTest::qWaitForWindowExposed(&window));
const QPoint deviceGlobalPos =
QHighDpi::toNativePixels(window.mapToGlobal(QPoint(50, 50)), window.windowHandle()->screen());
QHighDpi::toNativePixels(window.mapToGlobal(QPoint(50, 150)), window.windowHandle()->screen());
pressedTouchPoints[0].setScreenPos(deviceGlobalPos);
releasedTouchPoints[0].setScreenPos(deviceGlobalPos);

Expand Down

0 comments on commit 7f80c96

Please sign in to comment.