Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KDE PIM Add-ons
Commits
ac4f61f5
Commit
ac4f61f5
authored
Oct 11, 2022
by
Laurent Montel
Browse files
Port to qregularexpression
parent
41e9f2c8
Pipeline
#245990
passed with stage
in 17 minutes and 31 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
plugins/messageviewer/bodypartformatter/autotests/rendertest-common.cpp
View file @
ac4f61f5
...
...
@@ -44,9 +44,9 @@ static void compareFile(const QString &outFile, const QString &referenceFile)
QVERIFY
(
f
.
open
(
QIODevice
::
ReadOnly
));
QString
content
=
QString
::
fromUtf8
(
f
.
readAll
());
f
.
close
();
content
.
replace
(
QReg
Exp
(
QStringLiteral
(
"
\"
file:[^
\"
]*[/(?:%2F)]([^
\"
/(?:%2F)]*)
\"
"
)),
QStringLiteral
(
"
\"
file:
\\
1
\"
"
));
content
.
replace
(
QReg
ularExpression
(
QStringLiteral
(
"
\"
file:[^
\"
]*[/(?:%2F)]([^
\"
/(?:%2F)]*)
\"
"
)),
QStringLiteral
(
"
\"
file:
\\
1
\"
"
));
content
.
replace
(
QLatin1String
(
"NBSP_ENTITY_PLACEHOLDER"
),
QLatin1String
(
" "
));
// undo above transformation for xmllint
content
.
replace
(
QReg
Exp
(
QStringLiteral
(
"/bodypart/
\\
d+/"
)),
QStringLiteral
(
"/bodypart/0/"
));
content
.
replace
(
QReg
ularExpression
(
QStringLiteral
(
"/bodypart/
\\
d+/"
)),
QStringLiteral
(
"/bodypart/0/"
));
QVERIFY
(
f
.
open
(
QIODevice
::
WriteOnly
|
QIODevice
::
Truncate
));
f
.
write
(
content
.
toUtf8
());
f
.
close
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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