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
Kalendar
Commits
4b0938fb
Commit
4b0938fb
authored
Aug 12, 2022
by
Carl Schwan
🚴
Browse files
Fix another crash due to auto and QString
Signed-off-by:
Carl Schwan
<
carl@carlschwan.eu
>
parent
0164b8b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/mail/mime/partmodel.cpp
View file @
4b0938fb
...
...
@@ -31,7 +31,9 @@ std::pair<QString, bool> PartModel::trim(const QString &text)
// Reply
QRegularExpression
{
QStringLiteral
(
"<p>.?Am.*schrieb.*:</p>"
),
QRegularExpression
::
CaseInsensitiveOption
},
// Signature
QRegularExpression
{
QStringLiteral
(
"<p>.?--(
\\
s|\u00A0)<br>"
),
QRegularExpression
::
CaseInsensitiveOption
}};
QRegularExpression
{
QStringLiteral
(
"<p>.?--(
\\
s|\u00A0)<br>"
),
QRegularExpression
::
CaseInsensitiveOption
},
};
for
(
const
auto
&
expression
:
delimiters
)
{
auto
i
=
expression
.
globalMatch
(
text
);
while
(
i
.
hasNext
())
{
...
...
@@ -54,9 +56,9 @@ std::pair<QString, bool> PartModel::trim(const QString &text)
static
QString
addCss
(
const
QString
&
s
)
{
// Get the default font from QApplication
static
const
auto
fontFamily
=
QFont
{}.
family
();
static
const
QString
fontFamily
=
QFont
{}.
family
();
// overflow:hidden ensures no scrollbars are ever shown.
static
const
auto
css
=
QStringLiteral
(
"<style>
\n
"
)
static
const
QString
css
=
QStringLiteral
(
"<style>
\n
"
)
+
QStringLiteral
(
"body {
\n
"
" overflow:hidden;
\n
"
...
...
@@ -70,9 +72,9 @@ static QString addCss(const QString &s)
"}
\n
"
)
+
QStringLiteral
(
"</style>"
);
const
auto
header
=
QLatin1String
(
"<!DOCTYPE HTML PUBLIC
\"
-//W3C//DTD HTML 4.01 Transitional//EN
\"
\"
http://www.w3.org/TR/html4/loose.dtd
\"
>
\n
"
"<html><head><title></title>"
)
const
QString
header
=
QLatin1String
(
"<!DOCTYPE HTML PUBLIC
\"
-//W3C//DTD HTML 4.01 Transitional//EN
\"
\"
http://www.w3.org/TR/html4/loose.dtd
\"
>
\n
"
"<html><head><title></title>"
)
+
css
+
QLatin1String
(
"</head>
\n
<body>
\n
"
);
return
header
+
s
+
QStringLiteral
(
"</body></html>"
);
}
...
...
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