summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/kernel
diff options
context:
space:
mode:
authorDebao Zhang <hello@debao.me>2013-03-27 22:16:32 +0800
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-27 19:34:22 +0100
commitf6e739d9e3125d3866651b896bdb057f1bfb4da9 (patch)
treedb59223373a94ad38798b3f7c5ea0b27933acf15 /tests/auto/widgets/kernel
parent8d009b38c8c1ce3e63cc28190250b766a24774da (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/kernel')
-rw-r--r--tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp4
-rw-r--r--tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp6
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
index b92a6ed222..c6835f6076 100644
--- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
+++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
@@ -1241,7 +1241,7 @@ public slots:
void DeleteLaterWidget::runTest()
{
- QObject *stillAlive = qFindChild<QObject*>(this, "deleteLater");
+ QObject *stillAlive = this->findChild<QObject*>("deleteLater");
QWidget *w = new QWidget(this);
connect(w, SIGNAL(destroyed()), this, SLOT(childDeleted()));
@@ -1287,7 +1287,7 @@ void tst_QApplication::testDeleteLater()
object->setObjectName("deleteLater");
object->deleteLater();
- QObject *stillAlive = qFindChild<QObject*>(wgt, "deleteLater");
+ QObject *stillAlive = wgt->findChild<QObject*>("deleteLater");
QVERIFY(stillAlive);
app.exec();
diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
index 3d3c858913..69d890fb7a 100644
--- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
+++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
@@ -6130,7 +6130,7 @@ static void workaroundPaletteIssue(QWidget *widget)
if (!widget)
return;
- QWidget *navigationBar = qFindChild<QWidget *>(widget, QLatin1String("qt_calendar_navigationbar"));
+ QWidget *navigationBar = widget->findChild<QWidget *>(QLatin1String("qt_calendar_navigationbar"));
QVERIFY(navigationBar);
QPalette palette = navigationBar->palette();
@@ -6229,7 +6229,7 @@ void tst_QWidget::renderInvisible()
}
// Get navigation bar and explicitly hide it.
- QWidget *navigationBar = qFindChild<QWidget *>(calendar.data(), QLatin1String("qt_calendar_navigationbar"));
+ QWidget *navigationBar = calendar.data()->findChild<QWidget *>(QLatin1String("qt_calendar_navigationbar"));
QVERIFY(navigationBar);
navigationBar->hide();
@@ -6252,7 +6252,7 @@ void tst_QWidget::renderInvisible()
}
// Get next month button.
- QWidget *nextMonthButton = qFindChild<QWidget *>(navigationBar, QLatin1String("qt_calendar_nextmonth"));
+ QWidget *nextMonthButton = navigationBar->findChild<QWidget *>(QLatin1String("qt_calendar_nextmonth"));
QVERIFY(nextMonthButton);
{ // Render next month button.