diff options
author | Marc Mutz <[email protected]> | 2025-07-15 13:06:12 +0200 |
---|---|---|
committer | Marc Mutz <[email protected]> | 2025-07-16 20:19:48 +0000 |
commit | 1ebc73808194577499b3a1d2e804b1de0d5ec607 (patch) | |
tree | 51cc97195041e0c0a23cf8919738109c5e2fabf3 /examples/gui/rasterwindow/rasterwindow.cpp | |
parent | 0fc9846f15b2b72cc8cf3d26c1de793086af9d56 (diff) |
QTextStreamPrivate::putString(), in numeric mode, and with
accounting-style alignment, parses the string to check whether it
starts with the current locale's negativeSign() or positiveSign(),
which, since Qt 6.0, are QStrings, when in Qt 5 they were mere
QChars (which was wrong).
The old code still assumed Qt 5 times and merely compared the front()
of the string (the first character) with the locale's QString. This
works for locales where the plus/minus signs are just one UTF-16 code
point, but not for those that require surrogate pairs or are just
plain more than one Unicode code point long, like ar_EG (Arabic as
written in Egypt).
Fix by using startsWith() instead of front() ==.
[ChangeLog][QtCore][QTextStream] Fixed
QTextStream::FieldAlignment::AlignAccountingStyle for locales that
have negativeSign/positiveSign (-/+) that take more than one UTF-16
code point (e.g. ar (Arabic)).
Fixes: QTBUG-138484
Pick-to: 6.10 6.9 6.8 6.5
Change-Id: I6120460cb2ea8ce201bca5ba404cdaea442b0cb6
Reviewed-by: Thiago Macieira <[email protected]>
Reviewed-by: Edward Welbourne <[email protected]>
Diffstat (limited to 'examples/gui/rasterwindow/rasterwindow.cpp')
0 files changed, 0 insertions, 0 deletions