summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2021-02-12 22:47:18 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2021-02-12 22:48:29 +0100
commit76fbe81975afdff600e155569bca6a5b522c915b (patch)
tree0b52087b9e2d518c533269ec068ec2d2f8b400e6 /kde-frameworks/kio/files
parentkde-apps/kate: Fix hanging test (diff)
downloadgentoo-76fbe81975afdff600e155569bca6a5b522c915b.tar.gz
gentoo-76fbe81975afdff600e155569bca6a5b522c915b.tar.bz2
gentoo-76fbe81975afdff600e155569bca6a5b522c915b.zip
kde-frameworks/kio: Fix default codec being set to US-ASCII in apps
KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=432406 Reported-by: Stefan Radermacher <gentoo@zaister.de> Closes: https://bugs.gentoo.org/765430 Package-Manager: Portage-3.0.14, Repoman-3.0.2 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-frameworks/kio/files')
-rw-r--r--kde-frameworks/kio/files/kio-5.77.0-fix-default-codec-not-usascii-1.patch36
-rw-r--r--kde-frameworks/kio/files/kio-5.77.0-fix-default-codec-not-usascii-2.patch100
2 files changed, 136 insertions, 0 deletions
diff --git a/kde-frameworks/kio/files/kio-5.77.0-fix-default-codec-not-usascii-1.patch b/kde-frameworks/kio/files/kio-5.77.0-fix-default-codec-not-usascii-1.patch
new file mode 100644
index 00000000000..8f589b796aa
--- /dev/null
+++ b/kde-frameworks/kio/files/kio-5.77.0-fix-default-codec-not-usascii-1.patch
@@ -0,0 +1,36 @@
+From 0a13e0a3e830be2b2b2e5c2c6cf8cef25bd68bd8 Mon Sep 17 00:00:00 2001
+From: Tusooa Zhu <tusooa@vista.aero>
+Date: Thu, 4 Feb 2021 08:36:26 -0500
+Subject: [PATCH] Fix default codec being set to "US-ASCII" in KIO apps
+
+From https://doc.qt.io/qt-5/qloggingcategory.html#Q_LOGGING_CATEGORY-1 :
+"The implicitly-defined QLoggingCategory object is created on first use,
+in a thread-safe manner."
+
+The original way to explicitly define a static QLoggingCategory will lead
+to a call to ucnv_getDefaultName() before QApplication constructor (where
+setlocale() is called), thus making QTextCodec::codecForLocale() misbehave.
+Here we replace the explicit definition with the Q_LOGGING_CATEGORY macro,
+and thus avoid this problem.
+
+BUG: 432406
+---
+ src/widgets/kdirmodel.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/widgets/kdirmodel.cpp b/src/widgets/kdirmodel.cpp
+index a48ab462..aa049e3d 100644
+--- a/src/widgets/kdirmodel.cpp
++++ b/src/widgets/kdirmodel.cpp
+@@ -36,7 +36,7 @@
+ #include <qt_windows.h>
+ #endif
+
+-static QLoggingCategory category("kf.kio.widgets.kdirmodel", QtInfoMsg);
++Q_LOGGING_CATEGORY(category, "kf.kio.widgets.kdirmodel", QtInfoMsg)
+
+ class KDirModelNode;
+ class KDirModelDirNode;
+--
+GitLab
+
diff --git a/kde-frameworks/kio/files/kio-5.77.0-fix-default-codec-not-usascii-2.patch b/kde-frameworks/kio/files/kio-5.77.0-fix-default-codec-not-usascii-2.patch
new file mode 100644
index 00000000000..90f4bb5b0a9
--- /dev/null
+++ b/kde-frameworks/kio/files/kio-5.77.0-fix-default-codec-not-usascii-2.patch
@@ -0,0 +1,100 @@
+From 423bea37e4bb06b9c04a62a9a91b720ec5d5e3d5 Mon Sep 17 00:00:00 2001
+From: Tusooa Zhu <tusooa@vista.aero>
+Date: Thu, 4 Feb 2021 18:06:23 -0500
+Subject: [PATCH] Use Q_LOGGING_CATEGORY macro instead of explicit
+ QLoggingCategory
+
+Explicitly defining a QLoggingCategory will make QTextCodec::codecForLocale()
+misbehave, so we change it to Q_LOGGING_CATEGORY macro.
+
+CCBUG: 432406
+---
+ src/kpasswdserver/kpasswdserver.cpp | 2 +-
+ src/urifilters/ikws/kuriikwsfilter.cpp | 2 +-
+ src/urifilters/ikws/kuriikwsfiltereng.cpp | 2 +-
+ src/urifilters/ikws/kurisearchfilter.cpp | 2 +-
+ src/urifilters/localdomain/localdomainurifilter.cpp | 2 +-
+ src/urifilters/shorturi/kshorturifilter.cpp | 2 +-
+ 6 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/src/kpasswdserver/kpasswdserver.cpp b/src/kpasswdserver/kpasswdserver.cpp
+index 4ed73085..a832a0ab 100644
+--- a/src/kpasswdserver/kpasswdserver.cpp
++++ b/src/kpasswdserver/kpasswdserver.cpp
+@@ -28,7 +28,7 @@
+ #include <QTimer>
+ #include <ctime>
+
+-static QLoggingCategory category("kf.kio.kpasswdserver", QtInfoMsg);
++Q_LOGGING_CATEGORY(category, "kf.kio.kpasswdserver", QtInfoMsg)
+
+ #define AUTHINFO_EXTRAFIELD_DOMAIN QStringLiteral("domain")
+ #define AUTHINFO_EXTRAFIELD_ANONYMOUS QStringLiteral("anonymous")
+diff --git a/src/urifilters/ikws/kuriikwsfilter.cpp b/src/urifilters/ikws/kuriikwsfilter.cpp
+index 3a516fd8..bbc17678 100644
+--- a/src/urifilters/ikws/kuriikwsfilter.cpp
++++ b/src/urifilters/ikws/kuriikwsfilter.cpp
+@@ -22,7 +22,7 @@
+ #define QL1C(x) QLatin1Char(x)
+
+ namespace {
+-QLoggingCategory category("kf.kio.urifilters.ikws", QtWarningMsg);
++Q_LOGGING_CATEGORY(category, "kf.kio.urifilters.ikws", QtWarningMsg)
+ }
+
+ /**
+diff --git a/src/urifilters/ikws/kuriikwsfiltereng.cpp b/src/urifilters/ikws/kuriikwsfiltereng.cpp
+index 5b1bbc48..29647e3e 100644
+--- a/src/urifilters/ikws/kuriikwsfiltereng.cpp
++++ b/src/urifilters/ikws/kuriikwsfiltereng.cpp
+@@ -22,7 +22,7 @@
+ #include <QLoggingCategory>
+
+ namespace {
+-QLoggingCategory category("kf.kio.urifilters.ikws", QtWarningMsg);
++Q_LOGGING_CATEGORY(category, "kf.kio.urifilters.ikws", QtWarningMsg)
+ }
+
+ #define PDVAR(n, v) qCDebug(category) << n << " = '" << v << "'"
+diff --git a/src/urifilters/ikws/kurisearchfilter.cpp b/src/urifilters/ikws/kurisearchfilter.cpp
+index a12a9f59..669246c1 100644
+--- a/src/urifilters/ikws/kurisearchfilter.cpp
++++ b/src/urifilters/ikws/kurisearchfilter.cpp
+@@ -26,7 +26,7 @@
+ K_PLUGIN_CLASS_WITH_JSON(KUriSearchFilter, "kurisearchfilter.json")
+
+ namespace {
+-QLoggingCategory category("kf.kio.urifilters.ikws", QtWarningMsg);
++Q_LOGGING_CATEGORY(category, "kf.kio.urifilters.ikws", QtWarningMsg)
+ }
+
+ KUriSearchFilter::KUriSearchFilter(QObject *parent, const QVariantList &)
+diff --git a/src/urifilters/localdomain/localdomainurifilter.cpp b/src/urifilters/localdomain/localdomainurifilter.cpp
+index 862419a7..94a53606 100644
+--- a/src/urifilters/localdomain/localdomainurifilter.cpp
++++ b/src/urifilters/localdomain/localdomainurifilter.cpp
+@@ -20,7 +20,7 @@
+ #define QL1S(x) QLatin1String(x)
+
+ namespace {
+-QLoggingCategory category("kf.kio.urifilters.localdomain", QtWarningMsg);
++Q_LOGGING_CATEGORY(category, "kf.kio.urifilters.localdomain", QtWarningMsg)
+ }
+
+ /**
+diff --git a/src/urifilters/shorturi/kshorturifilter.cpp b/src/urifilters/shorturi/kshorturifilter.cpp
+index dc866e6c..62d810c4 100644
+--- a/src/urifilters/shorturi/kshorturifilter.cpp
++++ b/src/urifilters/shorturi/kshorturifilter.cpp
+@@ -27,7 +27,7 @@
+ #include <KUser>
+
+ namespace {
+-QLoggingCategory category("kf.kio.urifilters.shorturi", QtWarningMsg);
++Q_LOGGING_CATEGORY(category, "kf.kio.urifilters.shorturi", QtWarningMsg)
+ }
+
+ /**
+--
+GitLab
+