summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/dialogs/qinputdialog/tst_qinputdialog.cpp
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/dialogs/qinputdialog/tst_qinputdialog.cpp
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/dialogs/qinputdialog/tst_qinputdialog.cpp')
-rw-r--r--tests/auto/widgets/dialogs/qinputdialog/tst_qinputdialog.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/auto/widgets/dialogs/qinputdialog/tst_qinputdialog.cpp b/tests/auto/widgets/dialogs/qinputdialog/tst_qinputdialog.cpp
index 581696c509..7d8077d77d 100644
--- a/tests/auto/widgets/dialogs/qinputdialog/tst_qinputdialog.cpp
+++ b/tests/auto/widgets/dialogs/qinputdialog/tst_qinputdialog.cpp
@@ -153,13 +153,13 @@ void testInvalidateAndRestore(
template <typename SpinBoxType, typename ValueType>
void testGetNumeric(QInputDialog *dialog, SpinBoxType * = 0, ValueType * = 0)
{
- SpinBoxType *sbox = qFindChild<SpinBoxType *>(dialog);
+ SpinBoxType *sbox = dialog->findChild<SpinBoxType *>();
QVERIFY(sbox != 0);
- QLineEdit *ledit = qFindChild<QLineEdit *>(static_cast<QObject *>(sbox));
+ QLineEdit *ledit = static_cast<QObject *>(sbox)->findChild<QLineEdit *>();
QVERIFY(ledit != 0);
- QDialogButtonBox *bbox = qFindChild<QDialogButtonBox *>(dialog);
+ QDialogButtonBox *bbox = dialog->findChild<QDialogButtonBox *>();
QVERIFY(bbox != 0);
QPushButton *okButton = bbox->button(QDialogButtonBox::Ok);
QVERIFY(okButton != 0);
@@ -189,10 +189,10 @@ void testGetNumeric(QInputDialog *dialog, SpinBoxType * = 0, ValueType * = 0)
void testGetText(QInputDialog *dialog)
{
- QLineEdit *ledit = qFindChild<QLineEdit *>(dialog);
+ QLineEdit *ledit = dialog->findChild<QLineEdit *>();
QVERIFY(ledit);
- QDialogButtonBox *bbox = qFindChild<QDialogButtonBox *>(dialog);
+ QDialogButtonBox *bbox = dialog->findChild<QDialogButtonBox *>();
QVERIFY(bbox);
QPushButton *okButton = bbox->button(QDialogButtonBox::Ok);
QVERIFY(okButton);
@@ -207,10 +207,10 @@ void testGetText(QInputDialog *dialog)
void testGetItem(QInputDialog *dialog)
{
- QComboBox *cbox = qFindChild<QComboBox *>(dialog);
+ QComboBox *cbox = dialog->findChild<QComboBox *>();
QVERIFY(cbox);
- QDialogButtonBox *bbox = qFindChild<QDialogButtonBox *>(dialog);
+ QDialogButtonBox *bbox = dialog->findChild<QDialogButtonBox *>();
QVERIFY(bbox);
QPushButton *okButton = bbox->button(QDialogButtonBox::Ok);
QVERIFY(okButton);
@@ -245,7 +245,7 @@ void tst_QInputDialog::testFuncGetItem(QInputDialog *dialog)
void tst_QInputDialog::timerEvent(QTimerEvent *event)
{
killTimer(event->timerId());
- QInputDialog *dialog = qFindChild<QInputDialog *>(parent);
+ QInputDialog *dialog = parent->findChild<QInputDialog *>();
QVERIFY(dialog);
if (testFunc)
testFunc(dialog);