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
PIM
KMime
Commits
548ec261
Commit
548ec261
authored
Jan 10, 2022
by
Laurent Montel
😁
Browse files
Port to QRegularExpression
parent
0a8ec44f
Pipeline
#121420
passed with stage
in 4 minutes and 25 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/kmime_util.cpp
View file @
548ec261
...
...
@@ -21,7 +21,7 @@
#include <KCharsets>
#include <QCoreApplication>
#include <QReg
Exp
>
#include <QReg
ularExpression
>
#include <cctype>
#include <cstdlib>
...
...
@@ -456,7 +456,7 @@ void addQuotes_impl(StringType &str, bool forceQuotes)
bool
needsQuotes
=
false
;
for
(
int
i
=
0
;
i
<
str
.
length
();
i
++
)
{
const
CharType
cur
=
str
.
at
(
i
);
if
(
QString
(
ToString
(
str
)).
contains
(
QReg
Exp
(
QStringLiteral
(
"
\"
|
\\\\
|=|
\\
]|
\\
[|:|;|,|
\\
.|,|@|<|>|
\\
)|
\\
("
))))
{
if
(
QString
(
ToString
(
str
)).
contains
(
QReg
ularExpression
(
QStringLiteral
(
"
\"
|
\\\\
|=|
\\
]|
\\
[|:|;|,|
\\
.|,|@|<|>|
\\
)|
\\
("
))))
{
needsQuotes
=
true
;
}
if
(
cur
==
CharConverterType
(
'\\'
)
||
cur
==
CharConverterType
(
'\"'
))
{
...
...
Write
Preview
Markdown
is supported
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