diff options
author | Gabriel de Dietrich <gabriel.dietrich-de@nokia.com> | 2010-11-02 16:25:54 (GMT) |
---|---|---|
committer | Gabriel de Dietrich <gabriel.dietrich-de@nokia.com> | 2010-11-02 16:50:17 (GMT) |
commit | 445ef8847979dab72893aab1924d46d0fe1a8a3e (patch) | |
tree | 52141d20819c3037b35bd54a1494e738c0f81400 /tests/auto/qdoublevalidator | |
parent | 8e2b95b1115bc07f81d0fa22cc2929bb28d3e9bb (diff) | |
download | Qt-445ef8847979dab72893aab1924d46d0fe1a8a3e.zip Qt-445ef8847979dab72893aab1924d46d0fe1a8a3e.tar.gz Qt-445ef8847979dab72893aab1924d46d0fe1a8a3e.tar.bz2 |
With some locales, QDoubleValidator would not accept "C" locale valid numbers
Locales using dot as thousands delimiter and comma as decimal
separator are prone to this error.
This is a regression introduced by commit b81b8e43ad57183ed66.
Auto-tests included.
Reviewed-by: Olivier
Task-number: QTBUG_14935
Diffstat (limited to 'tests/auto/qdoublevalidator')
-rw-r--r-- | tests/auto/qdoublevalidator/tst_qdoublevalidator.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/qdoublevalidator/tst_qdoublevalidator.cpp b/tests/auto/qdoublevalidator/tst_qdoublevalidator.cpp index 26890b3..3470456 100644 --- a/tests/auto/qdoublevalidator/tst_qdoublevalidator.cpp +++ b/tests/auto/qdoublevalidator/tst_qdoublevalidator.cpp @@ -214,6 +214,10 @@ void tst_QDoubleValidator::validate_data() arabicNum += QChar(1643); arabicNum += QChar(1636); QTest::newRow("arabic") << "ar" << 0.0 << 20.0 << 2 << arabicNum << ACC << ACC; + + QTest::newRow("data_QTBUG_14935-1") << "de" << 0.0 << 1.0 << 5 << QString("0.31") << ACC << ACC; + QTest::newRow("data_QTBUG_14935-2") << "de" << 0.0 << 1000000.0 << 5 << QString("3.123") << ACC << ACC; + QTest::newRow("data_QTBUG_14935-3") << "de" << 0.0 << 1000000.0 << 5 << QString("123,345.678") << ACC << ACC; } void tst_QDoubleValidator::validate() |