summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qfuture.qdoc
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2020-04-16 16:20:43 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2020-04-17 13:43:50 +0200
commit300aaec2f9b72158aa5b9b26a4662b6fa635eec1 (patch)
treec5399b7adc20d5a4a94b72f7c147a3277f050089 /src/corelib/thread/qfuture.qdoc
parentad5aee2e34fad45d1d90bb059fa00a791d4ba3e2 (diff)
Fix digit grouping when digits are surrogat pairs
This is a follow-up to commit ed2b110b6add650954dc102a0317c14ff826c677 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>
Diffstat (limited to 'src/corelib/thread/qfuture.qdoc')
0 files changed, 0 insertions, 0 deletions