diff options
author | Debao Zhang <hello@debao.me> | 2013-03-25 17:40:59 +0800 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-27 06:01:11 +0100 |
commit | 1fb3d56efb134d9ea9cec6c9b52ae05274403a05 (patch) | |
tree | ca1cbddf5eb907ddfcab9960577e653f149eb57d /tests | |
parent | 90d74f86029d4761babf046056ff8647536fc348 (diff) |
QtWidgets tests: Don't use the deprecated QTest::qWaitForWindowShown()
Change-Id: I2dd5a54f9485591ca2dab65f7a352ef453c185e2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'tests')
6 files changed, 8 insertions, 8 deletions
diff --git a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp index 095c1e87d3..47f7618f00 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp @@ -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); diff --git a/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp b/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp index 113ec1fd30..5d7925aeec 100644 --- a/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp +++ b/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp @@ -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)); diff --git a/tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp b/tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp index 413b71196d..e142e0ce6e 100644 --- a/tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp +++ b/tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp @@ -4255,7 +4255,7 @@ void tst_QTreeView::quickExpandCollapse() QVERIFY(rootIndex.isValid()); tree.show(); - QTest::qWaitForWindowShown(&tree); + QTest::qWaitForWindowExposed(&tree); int initialState = tree.state(); diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp index 13237e8c7a..3d3c858913 100644 --- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp +++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp @@ -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); diff --git a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp index ef6a4571d9..df53093e20 100644 --- a/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp +++ b/tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp @@ -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 diff --git a/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp b/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp index 09a6565ca6..75c826c4cc 100644 --- a/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp +++ b/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp @@ -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 |