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
PIM IncidenceEditor
Commits
e4a6afc7
Commit
e4a6afc7
authored
Jan 15, 2021
by
Laurent Montel
😁
Browse files
QString::split(..., Qt::SplitBehavior, ...) is already in Qt 5.14
parent
d71cabab
Pipeline
#47734
passed with stage
in 12 minutes and 38 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/incidenceattachment.cpp
View file @
e4a6afc7
...
...
@@ -394,22 +394,14 @@ void IncidenceAttachment::handlePasteOrDrop(const QMimeData *mimeData)
//urls = QList<QUrl>::fromMimeData( mimeData, &metadata );
probablyWeHaveUris
=
true
;
labels
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
=
metadata
[
QStringLiteral
(
"labels"
)].
split
(
QLatin1Char
(
':'
),
QString
::
SkipEmptyParts
);
#else
=
metadata
[
QStringLiteral
(
"labels"
)].
split
(
QLatin1Char
(
':'
),
Qt
::
SkipEmptyParts
);
#endif
const
QStringList
::
Iterator
end
(
labels
.
end
());
for
(
QStringList
::
Iterator
it
=
labels
.
begin
();
it
!=
end
;
++
it
)
{
*
it
=
QUrl
::
fromPercentEncoding
((
*
it
).
toLatin1
());
}
}
else
if
(
mimeData
->
hasText
())
{
const
QString
text
=
mimeData
->
text
();
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList
lst
=
text
.
split
(
QLatin1Char
(
'\n'
),
QString
::
SkipEmptyParts
);
#else
QStringList
lst
=
text
.
split
(
QLatin1Char
(
'\n'
),
Qt
::
SkipEmptyParts
);
#endif
urls
.
reserve
(
lst
.
count
());
QStringList
::
ConstIterator
end
(
lst
.
constEnd
());
for
(
QStringList
::
ConstIterator
it
=
lst
.
constBegin
();
it
!=
end
;
++
it
)
{
...
...
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