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/itemviews/qitemdelegate | |
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/itemviews/qitemdelegate')
-rw-r--r-- | tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp b/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp index 22a1743ff1..d47eebe03a 100644 --- a/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp +++ b/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp @@ -365,7 +365,7 @@ void tst_QItemDelegate::editorKeyPress() view.setCurrentIndex(index); // the editor will only selectAll on the current index view.edit(index); - QList<QLineEdit*> lineEditors = qFindChildren<QLineEdit *>(view.viewport()); + QList<QLineEdit*> lineEditors = view.viewport()->findChildren<QLineEdit *>(); QCOMPARE(lineEditors.count(), 1); QLineEdit *editor = lineEditors.at(0); @@ -394,7 +394,7 @@ void tst_QItemDelegate::doubleEditorNegativeInput() view.setCurrentIndex(index); // the editor will only selectAll on the current index view.edit(index); - QList<QDoubleSpinBox*> editors = qFindChildren<QDoubleSpinBox *>(view.viewport()); + QList<QDoubleSpinBox*> editors = view.viewport()->findChildren<QDoubleSpinBox *>(); QCOMPARE(editors.count(), 1); QDoubleSpinBox *editor = editors.at(0); @@ -776,7 +776,7 @@ void tst_QItemDelegate::dateTimeEditor() QTestEventLoop::instance().enterLoop(1); - QTimeEdit *timeEditor = qFindChild<QTimeEdit *>(widget.viewport()); + QTimeEdit *timeEditor = widget.viewport()->findChild<QTimeEdit *>(); QVERIFY(timeEditor); QCOMPARE(timeEditor->time(), time); // The data must actually be different in order for the model @@ -790,7 +790,7 @@ void tst_QItemDelegate::dateTimeEditor() QTestEventLoop::instance().enterLoop(1); - QDateEdit *dateEditor = qFindChild<QDateEdit *>(widget.viewport()); + QDateEdit *dateEditor = widget.viewport()->findChild<QDateEdit *>(); QVERIFY(dateEditor); QCOMPARE(dateEditor->date(), date); dateEditor->setDate(date.addDays(60)); @@ -1312,7 +1312,7 @@ void tst_QItemDelegate::enterKey() view.edit(index); QTest::qWait(30); - QList<QWidget*> lineEditors = qFindChildren<QWidget *>(view.viewport(), QString::fromLatin1("TheEditor")); + QList<QWidget*> lineEditors = view.viewport()->findChildren<QWidget *>(QString::fromLatin1("TheEditor")); QCOMPARE(lineEditors.count(), 1); QPointer<QWidget> editor = lineEditors.at(0); @@ -1344,7 +1344,7 @@ void tst_QItemDelegate::task257859_finalizeEdit() view.edit(index); QTest::qWait(30); - QList<QLineEdit *> lineEditors = qFindChildren<QLineEdit *>(view.viewport()); + QList<QLineEdit *> lineEditors = view.viewport()->findChildren<QLineEdit *>(); QCOMPARE(lineEditors.count(), 1); QPointer<QWidget> editor = lineEditors.at(0); @@ -1397,7 +1397,7 @@ void tst_QItemDelegate::comboBox() QTestEventLoop::instance().enterLoop(1); - QComboBox *boolEditor = qFindChild<QComboBox*>(widget.viewport()); + QComboBox *boolEditor = widget.viewport()->findChild<QComboBox*>(); QVERIFY(boolEditor); QCOMPARE(boolEditor->currentIndex(), 1); // True is selected initially. // The data must actually be different in order for the model |