aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2021-07-06 18:07:47 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2021-07-07 22:35:56 +0200
commit30de3b58bf26fdfa83efc8e2c61fbcc29f20ee33 (patch)
tree1051015409efcf9f88c35c89153a04980fcbf849 /tests/auto
parentb3d9dd9af3d867f9b5fad195d91c011618bb8c61 (diff)
Be sure to click outside the menu in tst_QQuickMenu::mouse()
It seems that with Fusion style, the menu is somehow larger. Pick-to: 6.2 Change-Id: I2270d5db3cdb89da36f31d5b49225c16e34f114f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qquickmenu/tst_qquickmenu.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/auto/qquickmenu/tst_qquickmenu.cpp b/tests/auto/qquickmenu/tst_qquickmenu.cpp
index 92ea452a..b3d91dc8 100644
--- a/tests/auto/qquickmenu/tst_qquickmenu.cpp
+++ b/tests/auto/qquickmenu/tst_qquickmenu.cpp
@@ -203,7 +203,8 @@ void tst_QQuickMenu::mouse()
QVERIFY(window->width() > menu->contentItem()->width());
QVERIFY(window->height() > menu->contentItem()->height());
QTest::mouseClick(window, Qt::LeftButton, Qt::NoModifier,
- QPoint(menu->contentItem()->width() + 1, menu->contentItem()->height() + 1));
+ QPoint(menu->contentItem()->x() + menu->contentItem()->width() + 1,
+ menu->contentItem()->y() + menu->contentItem()->height() + 1));
QTRY_COMPARE(visibleSpy.count(), 3);
QVERIFY(!menu->isVisible());
QVERIFY(!overlay->childItems().contains(menu->contentItem()->parentItem()));