summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorGatis Paeglis <gatis.paeglis@qt.io>2017-10-31 17:07:07 +0100
committerGatis Paeglis <gatis.paeglis@qt.io>2018-07-07 13:23:17 +0000
commitecb84788191a06b503028aa89820a3b6ae0e45da (patch)
tree04951724c45f36de5d4839bf4f6d7f322c37f452 /src/plugins
parent42cc42acae8b4b5d8aa79e0d4f079b4322588ce7 (diff)
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>
Diffstat (limited to 'src/plugins')
0 files changed, 0 insertions, 0 deletions