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/qmainwindow/tst_qmainwindow.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/qmainwindow/tst_qmainwindow.cpp')
-rw-r--r-- | tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp b/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp index 896d4e8e6f..b42bfcac81 100644 --- a/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp +++ b/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp @@ -731,7 +731,7 @@ void tst_QMainWindow::statusBar() // deleting the status bar should remove it from the main window QMainWindow mw; QStatusBar *sb = mw.statusBar(); - QMainWindowLayout *l = qFindChild<QMainWindowLayout *>(&mw); + QMainWindowLayout *l = mw.findChild<QMainWindowLayout *>(); QVERIFY(l); int indexOfSb = l->indexOf(sb); QVERIFY(indexOfSb != -1); @@ -1425,7 +1425,7 @@ void AddDockWidget::apply(QMainWindow *mw) const QDockWidget *other = 0; if (mode == SplitMode || mode == TabMode) { - other = qFindChild<QDockWidget*>(mw, this->other); + other = mw->findChild<QDockWidget*>(this->other); QVERIFY(other != 0); } @@ -1463,14 +1463,14 @@ Q_DECLARE_METATYPE(MoveList) void MoveSeparator::apply(QMainWindow *mw) const { - QMainWindowLayout *l = qFindChild<QMainWindowLayout *>(mw); + QMainWindowLayout *l = mw->findChild<QMainWindowLayout *>(); QVERIFY(l); QList<int> path; if (name.isEmpty()) { path << area; } else { - QDockWidget *dw = qFindChild<QDockWidget*>(mw, name); + QDockWidget *dw = mw->findChild<QDockWidget*>(name); QVERIFY(dw != 0); path = l->layoutState.dockAreaLayout.indexOf(dw); } @@ -1488,7 +1488,7 @@ void MoveSeparator::apply(QMainWindow *mw) const QMap<QString, QRect> dockWidgetGeometries(QMainWindow *mw) { QMap<QString, QRect> result; - QList<QDockWidget*> dockWidgets = qFindChildren<QDockWidget*>(mw); + QList<QDockWidget*> dockWidgets = mw->findChildren<QDockWidget*>(); foreach (QDockWidget *dw, dockWidgets) result.insert(dw->objectName(), dw->geometry()); return result; |