summaryrefslogtreecommitdiffstats
path: root/tests/auto/qmenubar/tst_qmenubar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qmenubar/tst_qmenubar.cpp')
-rw-r--r--tests/auto/qmenubar/tst_qmenubar.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/auto/qmenubar/tst_qmenubar.cpp b/tests/auto/qmenubar/tst_qmenubar.cpp
index 51bb43716e..e1b7f1ff9b 100644
--- a/tests/auto/qmenubar/tst_qmenubar.cpp
+++ b/tests/auto/qmenubar/tst_qmenubar.cpp
@@ -344,6 +344,9 @@ void tst_QMenuBar::accel()
// create a popup menu with menu items set the accelerators later...
initSimpleMenubar();
+
+ // shortcuts won't work unless the window is active
+ QTRY_VERIFY( QApplication::activeWindow() );
// QTest::keyClick( 0, Qt::Key_A, AltKey );
QTest::keyClick( 0, Qt::Key_A, Qt::ControlModifier );
QTest::qWait(300);