From f6e739d9e3125d3866651b896bdb057f1bfb4da9 Mon Sep 17 00:00:00 2001 From: Debao Zhang Date: Wed, 27 Mar 2013 22:16:32 +0800 Subject: QtWidgets tests: Replace qFindChild{ren} with QObject::findChild{ren} Change-Id: I79a26387bcce0d7f79f4f9f70293e97dae52f949 Reviewed-by: Friedemann Kleint --- .../widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'tests/auto/widgets/itemviews/qitemdelegate') 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 lineEditors = qFindChildren(view.viewport()); + QList lineEditors = view.viewport()->findChildren(); 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 editors = qFindChildren(view.viewport()); + QList editors = view.viewport()->findChildren(); QCOMPARE(editors.count(), 1); QDoubleSpinBox *editor = editors.at(0); @@ -776,7 +776,7 @@ void tst_QItemDelegate::dateTimeEditor() QTestEventLoop::instance().enterLoop(1); - QTimeEdit *timeEditor = qFindChild(widget.viewport()); + QTimeEdit *timeEditor = widget.viewport()->findChild(); 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(widget.viewport()); + QDateEdit *dateEditor = widget.viewport()->findChild(); 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 lineEditors = qFindChildren(view.viewport(), QString::fromLatin1("TheEditor")); + QList lineEditors = view.viewport()->findChildren(QString::fromLatin1("TheEditor")); QCOMPARE(lineEditors.count(), 1); QPointer editor = lineEditors.at(0); @@ -1344,7 +1344,7 @@ void tst_QItemDelegate::task257859_finalizeEdit() view.edit(index); QTest::qWait(30); - QList lineEditors = qFindChildren(view.viewport()); + QList lineEditors = view.viewport()->findChildren(); QCOMPARE(lineEditors.count(), 1); QPointer editor = lineEditors.at(0); @@ -1397,7 +1397,7 @@ void tst_QItemDelegate::comboBox() QTestEventLoop::instance().enterLoop(1); - QComboBox *boolEditor = qFindChild(widget.viewport()); + QComboBox *boolEditor = widget.viewport()->findChild(); QVERIFY(boolEditor); QCOMPARE(boolEditor->currentIndex(), 1); // True is selected initially. // The data must actually be different in order for the model -- cgit v1.2.3