tst_QAbstractItemView: Wrap qWaitForWindowActive in QVERIFY
Return value of qWaitForWindowActive should be checked as it is marked
Q_REQUIRED_RESULT.
One of the calls was failing, so remove it and wait for the next condition
instead.
Amends d0dffdfc01.
Change-Id: I0c0b2bf11504730477158a5e1fb3018f359a6fb9
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
bb10
parent
1875db1849
commit
233046d39c
|
|
@ -2502,7 +2502,7 @@ void tst_QAbstractItemView::checkFocusAfterActivationChanges()
|
|||
view->setItemDelegate(&delegate);
|
||||
w.show();
|
||||
|
||||
QTest::qWaitForWindowActive(&w);
|
||||
QVERIFY(QTest::qWaitForWindowActive(&w));
|
||||
QVERIFY(le->hasFocus());
|
||||
|
||||
view->setFocus();
|
||||
|
|
@ -2513,12 +2513,11 @@ void tst_QAbstractItemView::checkFocusAfterActivationChanges()
|
|||
QVERIFY(delegate.openedEditor->hasFocus());
|
||||
|
||||
QApplication::setActiveWindow(&otherTopLevel);
|
||||
QTest::qWaitForWindowActive(&otherTopLevel);
|
||||
otherTopLevel.setFocus();
|
||||
QVERIFY(!delegate.openedEditor);
|
||||
QTRY_VERIFY(!delegate.openedEditor);
|
||||
|
||||
QApplication::setActiveWindow(&w);
|
||||
QTest::qWaitForWindowActive(&w);
|
||||
QVERIFY(QTest::qWaitForWindowActive(&w));
|
||||
QVERIFY(view->hasFocus());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue