Fix system locale instantiation
Construction of the static QLocalePrivate called defaultIndex() and systemData() in an implementation-dependent order, but defaultIndex() needs to be called after systemData(). So move the systemData() call that's used to ensure it all stays up to date to before the static initializer. Pick-to: 6.2 Change-Id: I801b678c01b4e4ddd4de16e9aead7167ec4477f3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>bb10
parent
21dd9b96a5
commit
05d336620c
|
|
@ -2650,8 +2650,8 @@ QString QLocale::toString(double f, char format, int precision) const
|
|||
|
||||
QLocale QLocale::system()
|
||||
{
|
||||
QT_PREPEND_NAMESPACE(systemData)(); // Ensure system data is up to date.
|
||||
static QLocalePrivate locale(systemData(), defaultIndex(), DefaultNumberOptions, 1);
|
||||
QT_PREPEND_NAMESPACE(systemData)(); // trigger updating of the system data if necessary
|
||||
|
||||
return QLocale(locale);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue