From bc5953f35ba12a6bc4fa9ed27a0f8113abeaebc8 Mon Sep 17 00:00:00 2001 From: Johan Klokkhammer Helsing Date: Thu, 7 Jun 2018 13:32:19 +0200 Subject: [PATCH] tst_QMenu: Skip tests that require real input events on Wayland Task-number: QTBUG-62188 Change-Id: I942c2ecadafe2caf430aa83fbba5c03a476c1e38 Reviewed-by: Richard Moe Gustavsen --- tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp b/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp index a88fd8d19c..634e258250 100644 --- a/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp +++ b/tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp @@ -1143,8 +1143,16 @@ void tst_QMenu::QTBUG7411_submenus_activate() QTRY_VERIFY(sub1.isVisible()); } +static bool isPlatformWayland() +{ + return !QGuiApplication::platformName().compare(QLatin1String("wayland"), Qt::CaseInsensitive); +} + void tst_QMenu::QTBUG30595_rtl_submenu() { + if (isPlatformWayland()) + QSKIP("Creating xdg_popups on Wayland requires real input events. Positions would be off."); + QMenu menu("Test Menu"); menu.setLayoutDirection(Qt::RightToLeft); QMenu sub("&sub"); @@ -1179,6 +1187,9 @@ void tst_QMenu::QTBUG20403_nested_popup_on_shortcut_trigger() #ifndef Q_OS_MACOS void tst_QMenu::click_while_dismissing_submenu() { + if (isPlatformWayland()) + QSKIP("Wayland: Creating (grabbing) popups requires real mouse events."); + QMenu menu("Test Menu"); QAction *action = menu.addAction("action"); QMenu sub("&sub");