summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qdialogbuttonbox.cpp
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2020-01-06 17:47:41 +0100
committerEdward Welbourne <edward.welbourne@qt.io>2020-01-16 10:28:08 +0100
commitc0ea88a6776b6281d5774d03572b1aecc2ef3c25 (patch)
tree32db6c8e868b1ad0d9126090df8613181f994a81 /src/widgets/widgets/qdialogbuttonbox.cpp
parente05511a3649b046557a61ef21cb1836627ad5449 (diff)
Fix MS-Win system locale code to return QString for numeric tokens
QSystemLocale::query() is specified to return a QString (wrapped in a QVariant) for the various tokens used in formatting numbers (zero digit, signs, separators) but the MS-Win back-end was returning QChar (wrapped as QVariant) instead, using the first UCS-2 code-point of the string (even if this was the first of a surrogate pair). The same error shall be perpetrated by its caller, but we can at least DTRT in the back-end, ready for the coming fix (in Qt 6) to its caller. In the process, eliminate some local variables that shadowed a member variable and adapt number-conversion to cope with surrogate-pair digits. Optimised the latter for the case where zero is "0". Change-Id: Idfb416c301add4c961dde613b3dc28b2e31fd0af Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/widgets/widgets/qdialogbuttonbox.cpp')
0 files changed, 0 insertions, 0 deletions