1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
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
|