diff options
author | Tuomas Heimonen <tuomas.heimonen@qt.io> | 2018-06-28 10:49:43 +0300 |
---|---|---|
committer | Tuomas Heimonen <tuomas.heimonen@qt.io> | 2018-06-29 09:17:05 +0000 |
commit | 4b5afc788f8f476a7bb2f57872ad8a017bf0c870 (patch) | |
tree | 59a93a20b954332c13b594023d594a2bb9dac149 /tests/auto/widgets/widgets | |
parent | d5e5e15c1c817cbfa5da8f80f6fa0e08b913e82e (diff) |
QIntValidator: Intermediate for number if digits equal or less than max
Input value which is over the highest acceptable value, but consisting
of a number of digits equal to or less than the max value should be
considered intermediate.
[ChangeLog][QtGui][QIntValidator] Input value with over the highest
acceptable value, but with equal or less amount of digits than the maximum
value is now considered intermediate.
Task-number: QTBUG-59650
Change-Id: I71a77c9c266f0f3b62c71ac6cb995019385c1cf5
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Diffstat (limited to 'tests/auto/widgets/widgets')
-rw-r--r-- | tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp b/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp index a10f128860..448e2030bc 100644 --- a/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp +++ b/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp @@ -2664,9 +2664,9 @@ void tst_QLineEdit::setValidator_QIntValidator_data() << 0 << 100 << QString("153") - << QString(useKeys ? "15" : "") + << QString("153") << bool(useKeys) - << bool(useKeys ? true : false) + << bool(false) << uint(QLineEdit::Normal); QTest::newRow(QString(inputMode + "range [-100,100] int '-153'").toLatin1()) << -100 @@ -2687,7 +2687,7 @@ void tst_QLineEdit::setValidator_QIntValidator_data() QTest::newRow(QString(inputMode + "range [3,7] int '8'").toLatin1()) << 3 << 7 - << QString("8") + << QString("") << QString("") << bool(useKeys) << bool(false) @@ -3292,7 +3292,7 @@ void tst_QLineEdit::editInvalidText() { QLineEdit *testWidget = ensureTestWidget(); testWidget->clear(); - testWidget->setValidator(new QIntValidator(0, 120, 0)); + testWidget->setValidator(new QIntValidator(0, 12, 0)); testWidget->setText("1234"); QVERIFY(!testWidget->hasAcceptableInput()); |