Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
KDebugSettings
Commits
23a928d9
Commit
23a928d9
authored
Feb 01, 2021
by
Laurent Montel
😁
Browse files
Port QTextCodec
parent
b317fa5b
Pipeline
#49373
failed with stage
in 8 minutes and 45 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/kdebugsettingsutil.cpp
View file @
23a928d9
...
...
@@ -12,6 +12,9 @@
#include <QFile>
#include <QRegularExpression>
#include <QStandardPaths>
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#include <QTextCodec>
#endif
RenameCategory
KDebugSettingsUtil
::
parseRenameCategory
(
QString
line
,
const
QString
&
filename
)
{
...
...
@@ -51,7 +54,11 @@ RenameCategory::List KDebugSettingsUtil::readRenameCategories(const QString &fil
}
else
{
QString
data
;
QTextStream
ts
(
&
file
);
ts
.
setCodec
(
"ISO-8859-1"
);
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
ts
.
setCodec
(
QTextCodec
::
codecForName
(
"ISO-8859-1"
));
#else
ts
.
setEncoding
(
QStringConverter
::
Encoding
::
Latin1
);
#endif
while
(
!
ts
.
atEnd
())
{
data
=
ts
.
readLine
().
simplified
();
const
RenameCategory
category
=
parseRenameCategory
(
data
,
filename
);
...
...
@@ -189,7 +196,11 @@ KdeLoggingCategory::List KDebugSettingsUtil::readLoggingCategoriesForInserting(c
}
else
{
QString
data
;
QTextStream
ts
(
&
file
);
ts
.
setCodec
(
"ISO-8859-1"
);
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
ts
.
setCodec
(
QTextCodec
::
codecForName
(
"ISO-8859-1"
));
#else
ts
.
setEncoding
(
QStringConverter
::
Encoding
::
Latin1
);
#endif
while
(
!
ts
.
atEnd
())
{
data
=
ts
.
readLine
().
simplified
();
const
KdeLoggingCategory
category
=
parseLineKdeLoggingCategory
(
data
,
filename
);
...
...
@@ -223,7 +234,11 @@ void KDebugSettingsUtil::readLoggingCategories(const QString &filename, KdeLoggi
}
else
{
QString
data
;
QTextStream
ts
(
&
file
);
ts
.
setCodec
(
"ISO-8859-1"
);
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
ts
.
setCodec
(
QTextCodec
::
codecForName
(
"ISO-8859-1"
));
#else
ts
.
setEncoding
(
QStringConverter
::
Encoding
::
Latin1
);
#endif
while
(
!
ts
.
atEnd
())
{
data
=
ts
.
readLine
().
simplified
();
const
KdeLoggingCategory
category
=
parseLineKdeLoggingCategory
(
data
,
filename
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment