Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
PIM
KMailTransport
Commits
85b2d540
Commit
85b2d540
authored
Aug 01, 2020
by
Ahmad Samir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Port QRegExp to QRegularExpression
And one other minor optimisation.
parent
74457920
Pipeline
#29250
passed with stage
in 10 minutes and 23 seconds
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
src/kmailtransport/servertest.cpp
src/kmailtransport/servertest.cpp
+4
-4
No files found.
src/kmailtransport/servertest.cpp
View file @
85b2d540
...
...
@@ -17,6 +17,7 @@
#include <QHash>
#include <QHostInfo>
#include <QProgressBar>
#include <QRegularExpression>
#include <QTimer>
#include <QSet>
...
...
@@ -242,10 +243,9 @@ bool ServerTestPrivate::handlePopConversation(MailTransport::Socket *socket, int
// Initial Greeting
if
(
stage
==
0
)
{
//Regexp taken from POP3 ioslave
QString
responseWithoutCRLF
=
response
;
responseWithoutCRLF
.
chop
(
2
);
QRegExp
re
(
QStringLiteral
(
"<[A-Za-z0-9
\\
.
\\
-_]+@[A-Za-z0-9
\\
.
\\
-_]+>$"
),
Qt
::
CaseInsensitive
);
const
QString
responseWithoutCRLF
=
response
.
chopped
(
2
);
const
QRegularExpression
re
(
QStringLiteral
(
"<[A-Za-z0-9
\\
.
\\
-_]+@[A-Za-z0-9
\\
.
\\
-_]+>$"
),
QRegularExpression
::
CaseInsensitiveOption
);
if
(
responseWithoutCRLF
.
indexOf
(
re
)
!=
-
1
)
{
authenticationResults
[
type
]
<<
Transport
::
EnumAuthenticationType
::
APOP
;
}
...
...
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