summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2010-10-08 13:27:44 (GMT)
committeraxis <qt-info@nokia.com>2010-10-08 13:27:44 (GMT)
commita7eab236ca29a06180faa43f982365ae646bb9a3 (patch)
tree82fe55a8aa3932f4f64700a12ff4bb1e13eaafea /tests/auto
parentf8596b2269631b9522e51bb0a68d86588d4696c7 (diff)
parent4ee912a752a4b7f129e98e180328f1f46f053d4f (diff)
downloadQt-a7eab236ca29a06180faa43f982365ae646bb9a3.zip
Qt-a7eab236ca29a06180faa43f982365ae646bb9a3.tar.gz
Qt-a7eab236ca29a06180faa43f982365ae646bb9a3.tar.bz2
Merge branch '4.7-s60' into master-s60
Conflicts: src/openvg/qvg_symbian.cpp
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qinputdialog/tst_qinputdialog.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/auto/qinputdialog/tst_qinputdialog.cpp b/tests/auto/qinputdialog/tst_qinputdialog.cpp
index 0d6644a..5d03142 100644
--- a/tests/auto/qinputdialog/tst_qinputdialog.cpp
+++ b/tests/auto/qinputdialog/tst_qinputdialog.cpp
@@ -74,6 +74,7 @@ private slots:
void getItem_data();
void getItem();
void task256299_getTextReturnNullStringOnRejected();
+ void inputMethodHintsOfChildWidget();
};
QString stripFraction(const QString &s)
@@ -404,5 +405,24 @@ void tst_QInputDialog::getItem()
delete parent;
}
+void tst_QInputDialog::inputMethodHintsOfChildWidget()
+{
+ QInputDialog dialog;
+ dialog.setInputMode(QInputDialog::TextInput);
+ QList<QObject *> children = dialog.children();
+ QLineEdit *editWidget = 0;
+ for (int c = 0; c < children.size(); c++) {
+ editWidget = qobject_cast<QLineEdit *>(children.at(c));
+ if (editWidget)
+ break;
+ }
+ QVERIFY(editWidget);
+ QCOMPARE(editWidget->inputMethodHints(), dialog.inputMethodHints());
+ QCOMPARE(editWidget->inputMethodHints(), Qt::ImhNone);
+ dialog.setInputMethodHints(Qt::ImhDigitsOnly);
+ QCOMPARE(editWidget->inputMethodHints(), dialog.inputMethodHints());
+ QCOMPARE(editWidget->inputMethodHints(), Qt::ImhDigitsOnly);
+}
+
QTEST_MAIN(tst_QInputDialog)
#include "tst_qinputdialog.moc"