diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2020-09-04 18:21:34 +0200 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@qt.io> | 2020-09-04 21:19:45 +0200 |
commit | 52ae6b1a506bea501ac7db424edddfa18383d20a (patch) | |
tree | 22278d29753e6a7bcfce1b6a3ef478f868e022d9 | |
parent | 2a7b8930f447aa2100e58abf6ebf208064ec0f2f (diff) |
Fix tst_qquickpopup::invisibleToolTipOpen() failing on subsequent runs
I don't know why this is necessary, but without it, the mouse area
doesn't get any mouse events on subsequent runs (tested with
QT_LOGGING_RULES=qt.quick.mouse=true).
Change-Id: I69fa13ad282789f522542e52a945973fee66f44d
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
-rw-r--r-- | tests/auto/qquickpopup/tst_qquickpopup.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/auto/qquickpopup/tst_qquickpopup.cpp b/tests/auto/qquickpopup/tst_qquickpopup.cpp index c74e43fe..fb91915c 100644 --- a/tests/auto/qquickpopup/tst_qquickpopup.cpp +++ b/tests/auto/qquickpopup/tst_qquickpopup.cpp @@ -1394,6 +1394,9 @@ void tst_QQuickPopup::invisibleToolTipOpen() QObject *loader = qvariant_cast<QObject *>(window->property("loader")); QVERIFY(loader); + // Send an extra move event, otherwise the test fails on subsequent runs for different styles for some reason... + // As an added bonus, this is also slightly more realistic. :D + QTest::mouseMove(window, QPoint(mouseArea->width() / 2 - 1, mouseArea->height() / 2 - 1)); QTest::mouseMove(window, QPoint(mouseArea->width() / 2, mouseArea->height() / 2)); QTRY_VERIFY(mouseArea->property("isToolTipVisible").toBool()); |