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/widgets/qmdiarea/tst_qmdiarea.cpp | |
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/widgets/qmdiarea/tst_qmdiarea.cpp')
-rw-r--r-- | tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp b/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp index 72945a9fd2..6364a736cd 100644 --- a/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp +++ b/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp @@ -111,7 +111,7 @@ static bool tabBetweenSubWindowsIn(QMdiArea *mdiArea, int tabCount = -1, bool re if (tabCount > 1) QTest::qWait(500); if (walkThrough) { - QRubberBand *rubberBand = qFindChild<QRubberBand *>(mdiArea->viewport()); + QRubberBand *rubberBand = mdiArea->viewport()->findChild<QRubberBand *>(); if (!rubberBand) { qWarning("No rubber band"); return false; @@ -2334,14 +2334,14 @@ void tst_QMdiArea::setViewMode() // Default. QVERIFY(!activeSubWindow->isMaximized()); - QTabBar *tabBar = qFindChild<QTabBar *>(&mdiArea); + QTabBar *tabBar = mdiArea.findChild<QTabBar *>(); QVERIFY(!tabBar); QCOMPARE(mdiArea.viewMode(), QMdiArea::SubWindowView); // Tabbed view. mdiArea.setViewMode(QMdiArea::TabbedView); QCOMPARE(mdiArea.viewMode(), QMdiArea::TabbedView); - tabBar = qFindChild<QTabBar *>(&mdiArea); + tabBar = mdiArea.findChild<QTabBar *>(); QVERIFY(tabBar); QVERIFY(tabBar->isVisible()); @@ -2408,7 +2408,7 @@ void tst_QMdiArea::setViewMode() // Go back to default (QMdiArea::SubWindowView). mdiArea.setViewMode(QMdiArea::SubWindowView); QVERIFY(!activeSubWindow->isMaximized()); - tabBar = qFindChild<QTabBar *>(&mdiArea); + tabBar = mdiArea.findChild<QTabBar *>(); QVERIFY(!tabBar); QCOMPARE(mdiArea.viewMode(), QMdiArea::SubWindowView); } @@ -2422,14 +2422,14 @@ void tst_QMdiArea::setTabsClosable() QCOMPARE(mdiArea.tabsClosable(), false); // change value before tab bar exists - QTabBar *tabBar = qFindChild<QTabBar *>(&mdiArea); + QTabBar *tabBar = mdiArea.findChild<QTabBar *>(); QVERIFY(!tabBar); mdiArea.setTabsClosable(true); QCOMPARE(mdiArea.tabsClosable(), true); // force tab bar creation mdiArea.setViewMode(QMdiArea::TabbedView); - tabBar = qFindChild<QTabBar *>(&mdiArea); + tabBar = mdiArea.findChild<QTabBar *>(); QVERIFY(tabBar); // value must've been propagated @@ -2452,14 +2452,14 @@ void tst_QMdiArea::setTabsMovable() QCOMPARE(mdiArea.tabsMovable(), false); // change value before tab bar exists - QTabBar *tabBar = qFindChild<QTabBar *>(&mdiArea); + QTabBar *tabBar = mdiArea.findChild<QTabBar *>(); QVERIFY(!tabBar); mdiArea.setTabsMovable(true); QCOMPARE(mdiArea.tabsMovable(), true); // force tab bar creation mdiArea.setViewMode(QMdiArea::TabbedView); - tabBar = qFindChild<QTabBar *>(&mdiArea); + tabBar = mdiArea.findChild<QTabBar *>(); QVERIFY(tabBar); // value must've been propagated @@ -2500,7 +2500,7 @@ void tst_QMdiArea::setTabShape() mdiArea.setViewMode(QMdiArea::TabbedView); - QTabBar *tabBar = qFindChild<QTabBar *>(&mdiArea); + QTabBar *tabBar = mdiArea.findChild<QTabBar *>(); QVERIFY(tabBar); QCOMPARE(tabBar->shape(), QTabBar::TriangularNorth); @@ -2543,7 +2543,7 @@ void tst_QMdiArea::setTabPosition() // Default. QCOMPARE(mdiArea.tabPosition(), QTabWidget::North); mdiArea.setViewMode(QMdiArea::TabbedView); - QTabBar *tabBar = qFindChild<QTabBar *>(&mdiArea); + QTabBar *tabBar = mdiArea.findChild<QTabBar *>(); QVERIFY(tabBar); QCOMPARE(tabBar->shape(), QTabBar::RoundedNorth); |