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
KAlarm
Commits
693763fb
Commit
693763fb
authored
Jan 15, 2021
by
Laurent Montel
😁
Browse files
QString::split(..., Qt::SplitBehavior, ...) is already in Qt 5.14
parent
cc90ab93
Pipeline
#47741
passed with stage
in 14 minutes and 55 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/lib/lineedit.cpp
View file @
693763fb
...
@@ -150,11 +150,7 @@ void LineEdit::dropEvent(QDropEvent* e)
...
@@ -150,11 +150,7 @@ void LineEdit::dropEvent(QDropEvent* e)
{
{
// Remove newlines from a list of email addresses, and allow an eventual mailto: scheme
// Remove newlines from a list of email addresses, and allow an eventual mailto: scheme
const
QString
mailto
=
QStringLiteral
(
"mailto:"
);
const
QString
mailto
=
QStringLiteral
(
"mailto:"
);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
newEmails
=
txt
.
split
(
QRegExp
(
QLatin1String
(
"[
\r\n
]+"
)),
QString
::
SkipEmptyParts
);
#else
newEmails
=
txt
.
split
(
QRegExp
(
QLatin1String
(
"[
\r\n
]+"
)),
Qt
::
SkipEmptyParts
);
newEmails
=
txt
.
split
(
QRegExp
(
QLatin1String
(
"[
\r\n
]+"
)),
Qt
::
SkipEmptyParts
);
#endif
for
(
QStringList
::
Iterator
it
=
newEmails
.
begin
();
it
!=
newEmails
.
end
();
++
it
)
for
(
QStringList
::
Iterator
it
=
newEmails
.
begin
();
it
!=
newEmails
.
end
();
++
it
)
{
{
if
((
*
it
).
startsWith
(
mailto
))
if
((
*
it
).
startsWith
(
mailto
))
...
...
Write
Preview
Supports
Markdown
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