qt5base-lts/tests/auto/corelib/tools/qlocale
Ulf Hermann 6b3845320a QLocale: Add option to pad numbers with trailing zeroes
EcmaScript mandates that number-to-string functions pad the resulting
strings with zeroes, up to the requested precision. QLocale actually
supports this, under the disguise of the "Alternate" flag, used by
QString::asprintf().

We split this flag into the three options it actually represents and
make IncludeTrailingZeroesAfterDot available as a NumberOption. This
allows us to generate numbers in an EcmaScript compliant way.

In addition, a symmetrical option to reject trailing zeroes when
parsing strings to numbers is added.

[ChangeLog][QtCore][QLocale] Additional flags in QLocale::NumberOption
allow generating strings from doubles in accordance to EcmaScript's
Number.toPrecision(n).

Change-Id: If1090d5a0364a29811011a472afc8b75d0af0a8f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-09-15 16:01:02 +00:00
..
syslocaleapp Updated license headers 2016-01-21 18:55:18 +00:00
test Use qtConfig throughout in qtbase 2016-08-19 04:28:05 +00:00
.gitignore Moving relevant tests to corelib/tools 2011-09-01 13:07:23 +02:00
qlocale.pro Fix compilation for WinRT 2015-12-14 08:43:15 +00:00
tst_qlocale.cpp QLocale: Add option to pad numbers with trailing zeroes 2016-09-15 16:01:02 +00:00