From 52ae6b1a506bea501ac7db424edddfa18383d20a Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Fri, 4 Sep 2020 18:21:34 +0200 Subject: 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 --- tests/auto/qquickpopup/tst_qquickpopup.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests') 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(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()); -- cgit v1.2.3