Stabilize tst_QAccessibility::actionTest

show() on a window is asynchronous.  Wait for it to complete before
continuing with the test.

Change-Id: Icd0daa0c0e8f287171c57708bb2fce0b6cf0906a
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
bb10
Rohan McGovern 2012-03-06 09:48:59 +10:00 committed by Qt by Nokia
parent f449cefc27
commit 961c3f958f
1 changed files with 1 additions and 0 deletions

View File

@ -777,6 +777,7 @@ void tst_QAccessibility::actionTest()
{
QPushButton *button = new QPushButton;
button->show();
QTest::qWaitForWindowShown(button);
button->clearFocus();
QCOMPARE(button->hasFocus(), false);
QAccessibleInterface *interface = QAccessible::queryAccessibleInterface(button);