* 0001-Revert-QThread-Unix-move-the-pthread_key-to-a-file-s.patch * 0002-Revert-QThread-Unix-revert-to-pthread-destruction-in.patch - Add patches (kde#499537, QTBUG-133500, QTBUG-130278) * 0001-QLocale-try-to-survive-being-created-during-applicat.patch * 0001-QSystemLocale-bail-out-if-accessed-post-destruction.patch * 0001-QLibraryInfo-speed-up-checking-if-qt-etc-qt.conf-res.patch OBS-URL: https://build.opensuse.org/package/show/KDE:Qt6/qt6-base?expand=0&rev=130
50 lines
1.8 KiB
Diff
50 lines
1.8 KiB
Diff
From 2ef615228bba9a8eb282437bfb7472f925610e89 Mon Sep 17 00:00:00 2001
|
|
From: Thiago Macieira <thiago.macieira@intel.com>
|
|
Date: Fri, 24 Jan 2025 10:28:30 -0800
|
|
Subject: [PATCH] QSystemLocale: bail out if accessed post-destruction
|
|
|
|
There's little we can do, but a lot of content ends up in QLocale very
|
|
late in the execution. Let's at least not crash.
|
|
|
|
Task-number: QTBUG-133206
|
|
Change-Id: I77d41141cb115147f9befffdd5e69dac19c96044
|
|
Reviewed-by: Albert Astals Cid <aacid@kde.org>
|
|
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
|
(cherry picked from commit e32f28034ad2383393645777bcd96eab3f696076)
|
|
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
(cherry picked from commit d5c5f9f3529b384d0d4bea2d51f0ad6a3d57481d)
|
|
---
|
|
src/corelib/text/qlocale_unix.cpp | 2 ++
|
|
src/corelib/text/qlocale_win.cpp | 2 ++
|
|
2 files changed, 4 insertions(+)
|
|
|
|
diff --git a/src/corelib/text/qlocale_unix.cpp b/src/corelib/text/qlocale_unix.cpp
|
|
index a934f24c016..91dbb74c207 100644
|
|
--- a/src/corelib/text/qlocale_unix.cpp
|
|
+++ b/src/corelib/text/qlocale_unix.cpp
|
|
@@ -127,6 +127,8 @@ QLocale QSystemLocale::fallbackLocale() const
|
|
QVariant QSystemLocale::query(QueryType type, QVariant &&in) const
|
|
{
|
|
QSystemLocaleData *d = qSystemLocaleData();
|
|
+ if (!d)
|
|
+ return QVariant();
|
|
|
|
if (type == LocaleChanged) {
|
|
d->readEnvironment();
|
|
diff --git a/src/corelib/text/qlocale_win.cpp b/src/corelib/text/qlocale_win.cpp
|
|
index 9fdb46a4c92..793751daaf0 100644
|
|
--- a/src/corelib/text/qlocale_win.cpp
|
|
+++ b/src/corelib/text/qlocale_win.cpp
|
|
@@ -828,6 +828,8 @@ QLocale QSystemLocale::fallbackLocale() const
|
|
QVariant QSystemLocale::query(QueryType type, QVariant &&in) const
|
|
{
|
|
QSystemLocalePrivate *d = systemLocalePrivate();
|
|
+ if (!d)
|
|
+ return QVariant();
|
|
switch(type) {
|
|
case DecimalPoint:
|
|
return d->decimalPoint();
|
|
--
|
|
2.48.1
|
|
|