test: fixed crash in tst_qmenubar::accel in qpa
authorRohan McGovern <rohan.mcgovern@nokia.com>
Fri, 12 Aug 2011 05:18:08 +0000 (15:18 +1000)
committerQt by Nokia <qt-info@nokia.com>
Fri, 12 Aug 2011 22:00:46 +0000 (00:00 +0200)
commitbf7ca774bd81b7a0fe65f99e62cf32690da9a77d
tree5a5467d2b1ac291efa31ddc41b3622f3307a7c43
parent879e351961e4203cb0e4c62b5658bc5563b145a1
test: fixed crash in tst_qmenubar::accel in qpa

Always verify that the application has an active window before
attempting to generate a key click.

This problem potentially affected all platforms, but is rare on non-qpa
Linux since QTest::qWaitForWindowShown would usually avoid the problem
on that platform.

Change-Id: I0c30be6228361faffa121c9c2d7a667f8351ebd6
Reviewed-on: http://codereview.qt.nokia.com/2896
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
tests/auto/qmenubar/tst_qmenubar.cpp