Go to file
Edward Welbourne 71fa90a37c Enable system locale to skip digit-grouping if configured to do so
On macOS it's possible to configure the system locale to not do digit
grouping (separating "thousands", in most western locales); it then
returns an empty string when asked for the grouping character, which
QLocale's system-configuration then ignored, falling back on using the
base UI locale's grouping separator. This could lead to the same
separator being used for decimal and grouping, which should never
happen, least of all when configured to not group at all.

In order to notice when this happens, query() must take care to return
an empty QString (as a QVariant, which is then non-null) when it *has*
a value for the locale property, and that value is empty, as opposed
to a null QVariant when it doesn't find a configured value. The caller
can then distinguish the two cases.

Furthermore, the group and decimal separators need to be distinct, so
we need to take care to avoid cases where the system overrides one
with what the CLDR has given for the other and doesn't over-ride that
other.

Only presently implemented for macOS and MS-Win, since the (other)
Unix implementation of the system locale returns single QChar values
for the numeric tokens - see QTBUG-69324, QTBUG-81053.

Fixes: QTBUG-80459
Change-Id: Ic3fbb0fb86e974604a60781378b09abc13bab15d
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-02-03 15:34:02 +01:00
bin Merge remote-tracking branch 'origin/5.13' into 5.14 2019-11-13 07:21:33 +01:00
config.tests wasm: fix arch detect on windows with WASM_OBJECT_FILES 2019-10-14 17:40:41 +10:00
dist Add changes file for Qt 5.14.1 2020-01-18 14:02:16 +01:00
doc Doc: Fix copy-paste error in QOpenGLTexture::Target docs 2020-01-28 18:42:58 +01:00
examples Markdown importer: use Unicode decoding 2020-02-03 14:58:00 +01:00
lib Purge all fonts 2015-08-18 19:59:14 +00:00
mkspecs Add function for initializing plugin resources for static builds 2020-01-30 16:59:31 +01:00
qmake Fix line ending in custom build steps of vcxproj files 2020-01-30 11:56:09 +00:00
src Enable system locale to skip digit-grouping if configured to do so 2020-02-03 15:34:02 +01:00
tests Enable system locale to skip digit-grouping if configured to do so 2020-02-03 15:34:02 +01:00
util Enable system locale to skip digit-grouping if configured to do so 2020-02-03 15:34:02 +01:00
.gitattributes Update the git-archive export options 2012-09-07 15:39:31 +02:00
.gitignore qfloat16: Check in the tables to Git 2019-06-03 10:42:53 -07:00
.qmake.conf Bump version 2020-02-02 13:41:14 +01:00
.tag Update the git-archive export options 2012-09-07 15:39:31 +02:00
config_help.txt Document -schannel option in configure -help 2020-01-06 14:14:41 +01:00
configure Android: remove remaining reference to -android-toolchain-version 2019-11-18 14:13:32 +01:00
configure.bat Configure: simplify logic 2019-03-14 12:13:58 +00:00
configure.json Report error when qt ios is built with debug only 2020-01-13 15:48:04 +01:00
configure.pri configure: Hacky fix to allow re-configuring on android 2019-12-16 19:17:47 +01:00
header.BSD Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.COMM Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.FDL Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.GPL Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.GPL-EXCEPT Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.LGPL Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.LGPL3 Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.LGPL3-COMM Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.LGPL-NOGPL2 Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.LGPL-ONLY Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.MIT qsimd: add support for new x86 CPU features 2018-05-05 06:20:07 +00:00
INSTALL INSTALL: Remove outdated reference to Windows CE 2019-02-13 13:01:57 +00:00
LICENSE.FDL Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
LICENSE.GPL2 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.GPL3 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.GPL3-EXCEPT Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.LGPL3 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.LGPLv3 Remove LICENSE.GPLv3, LICENSE.LGPLv21, LGPL_EXCEPTION.txt 2018-04-16 11:02:14 +00:00
LICENSE.QT-LICENSE-AGREEMENT Update enterprise license agreement v4.2.1 2019-12-18 13:07:19 +02:00
qtbase.pro nuke configure -host-option 2016-12-13 18:55:59 +00:00
sync.profile CMake: Add support for auto-importing plugins in CMake 2019-08-12 18:23:58 +02:00