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
d14eef60
Unverified
Commit
d14eef60
authored
Aug 13, 2022
by
Carl Schwan
🚴
Browse files
Fix difference in syntax between QRegEx and QRegularExpression
Signed-off-by:
Carl Schwan
<
carl@carlschwan.eu
>
parent
718dea24
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/mail/mime/mailtemplates.cpp
View file @
d14eef60
...
...
@@ -85,8 +85,8 @@ QString replacePrefixes(const QString &str, const QStringList &prefixRegExps, co
// construct a big regexp that
// 1. is anchored to the beginning of str (sans whitespace)
// 2. matches at least one of the part regexps in prefixRegExps
const
QString
bigRegExp
=
QStringLiteral
(
"^(
?:
\\
s+|(
?:
%1))+
\\
s*"
).
arg
(
prefixRegExps
.
join
(
QStringLiteral
(
")|(
?:
"
)));
static
QRegularExpression
regex
(
bigRegExp
,
QRegularExpression
::
CaseInsensitiveOption
);
const
QString
bigRegExp
=
QStringLiteral
(
"^(
\\
s+|(%1))+
\\
s*"
).
arg
(
prefixRegExps
.
join
(
QStringLiteral
(
")|("
)));
const
QRegularExpression
regex
(
bigRegExp
,
QRegularExpression
::
CaseInsensitiveOption
);
Q_ASSERT
(
regex
.
isValid
());
QString
tmp
=
str
;
...
...
@@ -106,6 +106,8 @@ const QStringList getForwardPrefixes()
// We want to be able to potentially reply to a variety of languages, so only translating is not enough
list
<<
i18n
(
"fwd"
);
list
<<
QStringLiteral
(
"fwd"
);
list
<<
QStringLiteral
(
"Fwd"
);
list
<<
QStringLiteral
(
"fw"
);
list
<<
QStringLiteral
(
"fw"
);
list
<<
QStringLiteral
(
"wg"
);
list
<<
QStringLiteral
(
"vs"
);
...
...
src/mail/mimetreeparser/autotests/setupenv.cpp
View file @
d14eef60
...
...
@@ -11,7 +11,6 @@
void
MimeTreeParser
::
Test
::
setupEnv
()
{
qputenv
(
"LC_ALL"
,
"C"
);
qputenv
(
"KDEHOME"
,
QFile
::
encodeName
(
QDir
::
homePath
()
+
QString
::
fromLatin1
(
"/.qttest"
)).
constData
());
qputenv
(
"LC_ALL"
,
"en_US.UTF-8"
);
QStandardPaths
::
setTestModeEnabled
(
true
);
}
src/mail/mimetreeparser/autotests/setupenv.h
View file @
d14eef60
...
...
@@ -16,8 +16,7 @@ namespace Test
/**
* setup a environment variables for tests:
* * set LC_ALL to C
* * set KDEHOME
* * set LC_ALL to en_US.UTF-8
*/
void
setupEnv
();
...
...
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