QtWidgets tests: Don't use the deprecated QTest::qWaitForWindowShown()
Change-Id: I2dd5a54f9485591ca2dab65f7a352ef453c185e2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This commit is contained in:
parent
90d74f8602
commit
1fb3d56efb
@ -3025,7 +3025,7 @@ void tst_QGraphicsView::task187791_setSceneCausesUpdate()
|
||||
QGraphicsView view(&scene);
|
||||
view.show();
|
||||
qApp->setActiveWindow(&view);
|
||||
QVERIFY(QTest::qWaitForWindowShown(&view));
|
||||
QVERIFY(QTest::qWaitForWindowExposed(&view));
|
||||
|
||||
EventSpy updateSpy(view.viewport(), QEvent::Paint);
|
||||
QCOMPARE(updateSpy.count(), 0);
|
||||
|
@ -2207,7 +2207,7 @@ void tst_QListView::taskQTBUG_21804_hiddenItemsAndScrollingWithKeys()
|
||||
lv.setSpacing(spacing);
|
||||
lv.setModel(&model);
|
||||
lv.show();
|
||||
QTest::qWaitForWindowShown(&lv);
|
||||
QTest::qWaitForWindowExposed(&lv);
|
||||
|
||||
// hide every odd number row
|
||||
for (int i = 1; i < model.rowCount(); i+=2)
|
||||
@ -2283,7 +2283,7 @@ void tst_QListView::spacing()
|
||||
lv.setModel(&model);
|
||||
lv.setSpacing(spacing);
|
||||
lv.show();
|
||||
QTest::qWaitForWindowShown(&lv);
|
||||
QTest::qWaitForWindowExposed(&lv);
|
||||
|
||||
// check size and position of first two items
|
||||
QRect item1 = lv.visualRect(lv.model()->index(0, 0));
|
||||
|
@ -4255,7 +4255,7 @@ void tst_QTreeView::quickExpandCollapse()
|
||||
QVERIFY(rootIndex.isValid());
|
||||
|
||||
tree.show();
|
||||
QTest::qWaitForWindowShown(&tree);
|
||||
QTest::qWaitForWindowExposed(&tree);
|
||||
|
||||
int initialState = tree.state();
|
||||
|
||||
|
@ -7019,7 +7019,7 @@ void tst_QWidget::moveWindowInShowEvent()
|
||||
|
||||
// show it
|
||||
widget.show();
|
||||
QVERIFY(QTest::qWaitForWindowShown(&widget));
|
||||
QVERIFY(QTest::qWaitForWindowExposed(&widget));
|
||||
QTest::qWait(100);
|
||||
// it should have moved
|
||||
QCOMPARE(widget.pos(), position);
|
||||
|
@ -2059,7 +2059,7 @@ void tst_QComboBox::task190351_layout()
|
||||
listCombo.setCurrentIndex(70);
|
||||
listCombo.showPopup();
|
||||
QTRY_VERIFY(listCombo.view());
|
||||
QTest::qWaitForWindowShown(listCombo.view());
|
||||
QTest::qWaitForWindowExposed(listCombo.view());
|
||||
QTRY_VERIFY(listCombo.view()->isVisible());
|
||||
QApplication::processEvents();
|
||||
|
||||
@ -2197,7 +2197,7 @@ void tst_QComboBox::task248169_popupWithMinimalSize()
|
||||
QTRY_VERIFY(comboBox.isVisible());
|
||||
comboBox.showPopup();
|
||||
QTRY_VERIFY(comboBox.view());
|
||||
QTest::qWaitForWindowShown(comboBox.view());
|
||||
QTest::qWaitForWindowExposed(comboBox.view());
|
||||
QTRY_VERIFY(comboBox.view()->isVisible());
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
|
@ -659,7 +659,7 @@ void tst_QPushButton::taskQTBUG_20191_shortcutWithKeypadModifer()
|
||||
QDialog dialog;
|
||||
dialog.setLayout(layout);
|
||||
dialog.show();
|
||||
QTest::qWaitForWindowShown(&dialog);
|
||||
QTest::qWaitForWindowExposed(&dialog);
|
||||
QApplication::setActiveWindow(&dialog);
|
||||
|
||||
// add shortcut '5' to button1 and test with keyboard and keypad '5' keys
|
||||
|
Loading…
Reference in New Issue
Block a user