qt5base-lts/tests/auto/widgets
Gatis Paeglis ecb8478819 tests: port tst_QGraphicsProxyWidget to QTEST_QPA_MOUSE_HANDLING
... and various other cleanups.

This patch re-factors tests that relied on QCursor API (directly or indirectly via
QTest::mouseMove widget overload) to use the QTEST_QPA_MOUSE_HANDLING code path.
Misuse of QCursor API causes tests to be flaky.

Removed Qt::X11BypassWindowManagerHint as it is not really needed. Based on
the comment where this flag is used, it would be needed for all test functions
that use mouse events. That assumption is not valid. A window is expected to have
received its final position when QTest::qWaitForWindowActive() returns. There were
issues with this on Unity, but those have been fixed.

Un-QSKIP-ed QTBUG_6986_sendMouseEventToAlienWidget for Q_OS_WIN.
Un-QSKIP-ed hoverEnterLeaveEvent for all platforms.
Un-QSKIP-ed bypassGraphicsProxyWidget for Q_OS_MAC and Q_OS_WIN as the test
passes on those platforms. According to QTBUG-33067 it used to crash with 5.2.0.

Removed unnecessary mouseMove() and stray mouseRelease() in mouseDoubleClickEvent().
Removed unnecessary show()/setVisible() on items that are being added to the scene -
items are visible by default.

Among other randomly spotted issues, one worth mentioning is that when adding
items to the scene after the view is already shown, we need to ensure that the scene
is updated (e.g QSignalSpy + QGraphicsScene::changed) before interacting with it. As
an example, mousePressReleaseEvent() only passed because of random luck that the
invalid coordinates were still within the bounding rect of the button. This patch
does not attempt to cleanup all instances of this anti-pattern.

Task-number: QTBUG-52546
Task-number: QTBUG-26948
Task-number: QTBUG-33067
Change-Id: I2ccbc004c1cb4f5b31c70c8568ee591c458d8446
Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io>
2018-07-07 13:23:17 +00:00
..
dialogs Merge remote-tracking branch 'origin/5.11' into dev 2018-07-02 11:23:45 +02:00
effects tst_QGraphicsEffect: Allow multiple paint events in itemHasNoContents() 2018-05-21 06:05:15 +00:00
graphicsview tests: port tst_QGraphicsProxyWidget to QTEST_QPA_MOUSE_HANDLING 2018-07-07 13:23:17 +00:00
itemviews Merge remote-tracking branch 'origin/5.11' into dev 2018-07-02 11:23:45 +02:00
kernel Merge remote-tracking branch 'origin/5.11' into dev 2018-07-02 11:23:45 +02:00
styles winrt: Make widgets/styles auto tests pass 2018-05-25 11:02:21 +00:00
util winrt: Make widgets/util auto tests pass 2018-05-25 11:02:23 +00:00
widgets Merge remote-tracking branch 'origin/5.11' into dev 2018-07-02 11:23:45 +02:00
widgets.pro Move QGestureRecognizer test to widgets/kernel 2017-06-02 18:36:11 +00:00