[PATCH] QLocale: try to survive being created during application shut down
authorThiago Macieira <thiago.macieira@intel.com>
Fri, 24 Jan 2025 18:43:38 +0000 (10:43 -0800)
committerPatrick Franz <deltaone@debian.org>
Sat, 1 Mar 2025 11:21:39 +0000 (12:21 +0100)
commit8be7003ada63b57e1d1e1a57118d233b93bc7f9f
tree82c89fdd4d714ff743bdedaa555f9461263a3ac3
parent5a9e25bd9c6d3bd0ce12d30b4cb316c2748bd63c
[PATCH] QLocale: try to survive being created during application shut down

QLocale is very often accessed during global static destructors, so
let's try and survive if the default has already been destroyed. In that
case, we shall fall back to the C locale.

I've placed the call to systemData(), which updates the system locale,
before the initialization of defaultLocalePrivate, as the initialization
of the latter depends on the former.

Task-number: QTBUG-133206
Change-Id: I48e29b45f9be4514336cfffdf5affa5631a956a3
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Albert Astals Cid <aacid@kde.org>
(cherry picked from commit e0a1f491567f2495443babc5aa36a038260f96c6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit bcc0e6124a2ec80df535178d056324433f9ff984)

Gbp-Pq: Name upstream_qlocale_shutdown.patch
src/corelib/text/qlocale.cpp