diff options
Diffstat (limited to 'tests/auto/qmenu')
-rw-r--r-- | tests/auto/qmenu/tst_qmenu.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/auto/qmenu/tst_qmenu.cpp b/tests/auto/qmenu/tst_qmenu.cpp index 0b513b8..16e6f00 100644 --- a/tests/auto/qmenu/tst_qmenu.cpp +++ b/tests/auto/qmenu/tst_qmenu.cpp @@ -111,6 +111,7 @@ private slots: void pushButtonPopulateOnAboutToShow(); void QTBUG7907_submenus_autoselect(); void QTBUG7411_submenus_activate(); + void QTBUG20403_nested_popup_on_shortcut_trigger(); void QTBUG_10735_crashWithDialog(); void QTBUG_25544_macMenuState(); void QTBUG_25544_macMenuActionState(); @@ -983,6 +984,22 @@ void tst_QMenu::QTBUG7411_submenus_activate() QTRY_VERIFY(sub1.isVisible()); } +void tst_QMenu::QTBUG20403_nested_popup_on_shortcut_trigger() +{ + QMenu menu("Test Menu"); + QMenu sub1("&sub1"); + QMenu subsub1("&subsub1"); + subsub1.addAction("foo"); + sub1.addMenu(&subsub1); + menu.addMenu(&sub1); + menu.show(); + QVERIFY(QTest::qWaitForWindowShown(&menu)); + QTest::keyPress(&menu, Qt::Key_S); + QTest::qWait(100); // 20ms delay with previous behavior + QTRY_VERIFY(sub1.isVisible()); + QVERIFY(!subsub1.isVisible()); +} + class MyMenu : public QMenu { Q_OBJECT |