diff options
author | Debao Zhang <hello@debao.me> | 2013-03-27 22:16:32 +0800 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-27 19:34:22 +0100 |
commit | f6e739d9e3125d3866651b896bdb057f1bfb4da9 (patch) | |
tree | db59223373a94ad38798b3f7c5ea0b27933acf15 /tests/auto/widgets/styles | |
parent | 8d009b38c8c1ce3e63cc28190250b766a24774da (diff) |
QtWidgets tests: Replace qFindChild{ren} with QObject::findChild{ren}
Change-Id: I79a26387bcce0d7f79f4f9f70293e97dae52f949
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'tests/auto/widgets/styles')
-rw-r--r-- | tests/auto/widgets/styles/qstyle/tst_qstyle.cpp | 2 | ||||
-rw-r--r-- | tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp b/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp index c733fadbf5..ef91d6d3d2 100644 --- a/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp +++ b/tests/auto/widgets/styles/qstyle/tst_qstyle.cpp @@ -689,7 +689,7 @@ void tst_QStyle::lineUpLayoutTest(QStyle *style) widget.setLayout(&layout); widget.setStyle(style); // propagate the style. - foreach (QWidget *w, qFindChildren<QWidget *>(&widget)) + foreach (QWidget *w, widget.findChildren<QWidget *>()) w->setStyle(style); widget.show(); QVERIFY(QTest::qWaitForWindowExposed(&widget)); diff --git a/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp b/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp index 305bee4e49..24e3ac2c99 100644 --- a/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp +++ b/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp @@ -656,7 +656,7 @@ void tst_QStyleSheetStyle::fontPropagation() QTabWidget tw; tw.setStyleSheet("QTabWidget { font-size: 20pt; }"); QVERIFY(FONTSIZE(tw) == 20); - QWidget *child = qFindChild<QWidget *>(&tw, "qt_tabwidget_tabbar"); + QWidget *child = tw.findChild<QWidget *>("qt_tabwidget_tabbar"); QVERIFY2(child, "QTabWidget did not contain a widget named \"qt_tabwidget_tabbar\""); QVERIFY(FONTSIZE(*child) == 20); } @@ -957,7 +957,7 @@ void tst_QStyleSheetStyle::tabAlignement() tabWidget.resize(QSize(400,400)); topLevel.show(); QVERIFY(QTest::qWaitForWindowExposed(&topLevel)); - QTabBar *bar = qFindChild<QTabBar*>(&tabWidget); + QTabBar *bar = tabWidget.findChild<QTabBar*>(); QVERIFY(bar); //check the tab is on the right tabWidget.setStyleSheet("QTabWidget::tab-bar { alignment: right ; }"); @@ -1030,7 +1030,7 @@ void tst_QStyleSheetStyle::minmaxSizes() QVERIFY(qAbs(page3->maximumSize().height() - 500 - 2) <= 2); QVERIFY(qAbs(page3->minimumSize().height() - 250 - 2) <= 2); QVERIFY(qAbs(page3->minimumSize().height() - 250 - 2) <= 2); - QTabBar *bar = qFindChild<QTabBar*>(&tabWidget); + QTabBar *bar = tabWidget.findChild<QTabBar*>(); QVERIFY(bar); #ifdef Q_OS_MAC QEXPECT_FAIL("", "QTBUG-23686", Continue); |