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
libksieve
Commits
5eb742e1
Commit
5eb742e1
authored
Aug 29, 2021
by
Laurent Montel
😁
Browse files
Port to QStringView::split
parent
be0aec6d
Pipeline
#77146
passed with stage
in 17 minutes and 8 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/ksieveui/autocreatescripts/autocreatescriptutil.cpp
View file @
5eb742e1
...
...
@@ -260,9 +260,13 @@ QString AutoCreateScriptUtil::generateConditionComment(const QString &comment)
{
QString
strComment
;
if
(
!
comment
.
trimmed
().
isEmpty
())
{
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
const
QVector
<
QStringView
>
commentList
=
QStringView
(
comment
).
split
(
QLatin1Char
(
'\n'
));
for
(
const
QStringView
str
:
commentList
)
{
#else
const
QVector
<
QStringRef
>
commentList
=
comment
.
splitRef
(
QLatin1Char
(
'\n'
));
for
(
const
QStringRef
&
str
:
commentList
)
{
#endif
if
(
str
.
isEmpty
())
{
strComment
+=
QLatin1Char
(
'\n'
);
}
else
{
...
...
src/ksieveui/autocreatescripts/sieveactionwidgetlister.cpp
View file @
5eb742e1
...
...
@@ -85,8 +85,13 @@ void SieveActionWidget::generatedScript(QString &script, QStringList &required,
indent
+=
AutoCreateScriptUtil
::
indentation
();
}
if
(
!
comment
.
trimmed
().
isEmpty
())
{
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
const
QVector
<
QStringView
>
commentList
=
QStringView
(
comment
).
split
(
QLatin1Char
(
'\n'
));
for
(
const
QStringView
str
:
commentList
)
{
#else
const
QVector
<
QStringRef
>
commentList
=
comment
.
splitRef
(
QLatin1Char
(
'\n'
));
for
(
const
QStringRef
&
str
:
commentList
)
{
#endif
if
(
str
.
isEmpty
())
{
script
+=
QLatin1Char
(
'\n'
);
}
else
{
...
...
src/ksieveui/autocreatescripts/sievescriptlistbox.cpp
View file @
5eb742e1
...
...
@@ -68,8 +68,13 @@ QString SieveScriptListItem::generatedScript(QStringList &required) const
{
QString
script
;
if
(
!
mDescription
.
trimmed
().
isEmpty
())
{
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
const
QVector
<
QStringView
>
commentList
=
QStringView
(
mDescription
).
split
(
QLatin1Char
(
'\n'
));
for
(
const
QStringView
str
:
commentList
)
{
#else
const
QVector
<
QStringRef
>
commentList
=
mDescription
.
splitRef
(
QLatin1Char
(
'\n'
));
for
(
const
QStringRef
&
str
:
commentList
)
{
#endif
if
(
str
.
isEmpty
())
{
script
+=
QLatin1Char
(
'\n'
);
}
else
{
...
...
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