qt6-bb10/tests/auto
Edward Welbourne 300aaec2f9 Fix digit grouping when digits are surrogat pairs
This is a follow-up to commit ed2b110b6a
to fix indexing errors. Added the test that should have accompanied
that commit, which found some bugs, and refined the Indian number
formatting test (on which it's based).

Make variable i in the loops that insert grouping characters in a
number be consistently a *character* offset - which, when each digit
is a surrogate pair, isn't the same as an index into the
QString. Apply the needed scaling when indexing with it, not when
setting it or decrementing it. Don't assume the separator has the same
width as a digit.

Differences in index no longer give the number of digits between two
points in a string, so actively track how many digits we've seen in a
group when converting a numeric string to the C locale. Partially
cleaned up the code for that in the process (more shall follow when I
sort out digit grouping properly, without special-casing India).

Change-Id: I13d0f24efa26e599dfefb5733e062088fa56d375
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-04-17 13:43:50 +02:00
..
cmake Get rid of QT_OPENGL_ES* 2020-04-17 11:50:24 +02:00
concurrent Improve Map|Map-Reduce and Filter|Filter-Reduce implementation 2020-04-14 19:06:27 +02:00
corelib Fix digit grouping when digits are surrogat pairs 2020-04-17 13:43:50 +02:00
dbus Fix autotests after the QHash changes 2020-04-09 20:04:15 +02:00
gui Get rid of QT_OPENGL_ES* 2020-04-17 11:50:24 +02:00
guiapplauncher
installed_cmake
network Merge remote-tracking branch 'origin/5.15' into dev 2020-04-11 14:59:13 +02:00
opengl Get rid of QT_OPENGL_ES* 2020-04-17 11:50:24 +02:00
other Merge remote-tracking branch 'origin/5.15' into dev 2020-04-08 20:11:39 +02:00
printsupport Regenerate projects one last time before merge 2020-02-12 17:30:49 +00:00
shared QWindowsFontDatabase: Check preferred family names for all fonts 2019-11-29 09:31:21 +01:00
sql QSqlError: Remove deprecated methods 2020-04-06 14:25:12 +02:00
testlib Restructure testlib selftest project 2020-03-24 21:04:43 +01:00
tools Fix autotests after the QHash changes 2020-04-09 20:04:15 +02:00
widgets Remove deprecated QStyle enum values 2020-04-16 16:53:18 +02:00
xml Merge remote-tracking branch 'origin/5.15' into dev 2020-03-16 18:41:27 +01:00
CMakeLists.txt cmake: Remove APPLE prefix from platform names 2020-03-16 17:57:56 +01:00
auto.pro Disable tests with qemu-arm & developer-build configurations in the CI 2019-10-03 15:12:33 +00:00
network-settings.h Revert "QAbstractSocket: deprecate 'error' member-function" 2020-02-26 23:07:52 +03:00