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
KDE PIM Add-ons
Commits
6fcdcf7f
Commit
6fcdcf7f
authored
Jan 15, 2021
by
Laurent Montel
😁
Browse files
QString::split(..., Qt::SplitBehavior, ...) is already in Qt 5.14
parent
0e765b8d
Pipeline
#47730
passed with stage
in 53 minutes and 55 seconds
Changes
7
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
akonadi-import-wizard/geary/gearysettings.cpp
View file @
6fcdcf7f
...
...
@@ -109,11 +109,7 @@ void GearySettings::readIdentity()
identity
->
setPrimaryEmailAddress
(
address
);
const
QString
alias
=
settings
->
value
(
QStringLiteral
(
"alternate_emails"
)).
toString
();
if
(
!
alias
.
isEmpty
())
{
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
identity
->
setEmailAliases
(
alias
.
split
(
QLatin1Char
(
';'
),
QString
::
SkipEmptyParts
));
#else
identity
->
setEmailAliases
(
alias
.
split
(
QLatin1Char
(
';'
),
Qt
::
SkipEmptyParts
));
#endif
}
const
QString
signatureStr
=
settings
->
value
(
QStringLiteral
(
"email_signature"
)).
toString
();
if
(
!
signatureStr
.
isEmpty
())
{
...
...
kaddressbook/editorpages/cryptopageplugin.cpp
View file @
6fcdcf7f
...
...
@@ -115,11 +115,7 @@ QString CryptoPagePlugin::title() const
void
CryptoPagePlugin
::
loadContact
(
const
KContacts
::
Addressee
&
contact
)
{
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const
QStringList
protocolPrefs
=
contact
.
custom
(
QStringLiteral
(
"KADDRESSBOOK"
),
QStringLiteral
(
"CRYPTOPROTOPREF"
)).
split
(
QLatin1Char
(
','
),
QString
::
SkipEmptyParts
);
#else
const
QStringList
protocolPrefs
=
contact
.
custom
(
QStringLiteral
(
"KADDRESSBOOK"
),
QStringLiteral
(
"CRYPTOPROTOPREF"
)).
split
(
QLatin1Char
(
','
),
Qt
::
SkipEmptyParts
);
#endif
const
uint
cryptoFormats
=
Kleo
::
stringListToCryptoMessageFormats
(
protocolPrefs
);
uint
msgFormat
=
1
;
...
...
@@ -133,16 +129,8 @@ void CryptoPagePlugin::loadContact(const KContacts::Addressee &contact)
// We don't use the contents of addr->key(...) because we want just a ref.
// to the key/cert. stored elsewhere.
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
mPgpKey
->
setFingerprints
(
contact
.
custom
(
QStringLiteral
(
"KADDRESSBOOK"
),
QStringLiteral
(
"OPENPGPFP"
)).
split
(
QLatin1Char
(
','
),
QString
::
SkipEmptyParts
));
#else
mPgpKey
->
setFingerprints
(
contact
.
custom
(
QStringLiteral
(
"KADDRESSBOOK"
),
QStringLiteral
(
"OPENPGPFP"
)).
split
(
QLatin1Char
(
','
),
Qt
::
SkipEmptyParts
));
#endif
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
mSmimeCert
->
setFingerprints
(
contact
.
custom
(
QStringLiteral
(
"KADDRESSBOOK"
),
QStringLiteral
(
"SMIMEFP"
)).
split
(
QLatin1Char
(
','
),
QString
::
SkipEmptyParts
));
#else
mSmimeCert
->
setFingerprints
(
contact
.
custom
(
QStringLiteral
(
"KADDRESSBOOK"
),
QStringLiteral
(
"SMIMEFP"
)).
split
(
QLatin1Char
(
','
),
Qt
::
SkipEmptyParts
));
#endif
}
void
CryptoPagePlugin
::
storeContact
(
KContacts
::
Addressee
&
contact
)
const
...
...
kaddressbook/importexportplugins/vcards/vcardimportexportplugininterface.cpp
View file @
6fcdcf7f
...
...
@@ -174,11 +174,7 @@ KContacts::Addressee::List VCardImportExportPluginInterface::filterContacts(cons
bool
addrDone
=
false
;
if
(
exportFieldType
&
ExportSelectionWidget
::
DiplayName
)
{
// output display name as N field
QString
fmtName
=
(
*
it
).
formattedName
();
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList
splitNames
=
fmtName
.
split
(
QLatin1Char
(
' '
),
QString
::
SkipEmptyParts
);
#else
QStringList
splitNames
=
fmtName
.
split
(
QLatin1Char
(
' '
),
Qt
::
SkipEmptyParts
);
#endif
if
(
splitNames
.
count
()
>=
2
)
{
addr
.
setPrefix
(
QString
());
addr
.
setGivenName
(
splitNames
.
takeFirst
());
...
...
plugins/messageviewer/bodypartformatter/gnupgwks/gnupgwksmessagepart.cpp
View file @
6fcdcf7f
...
...
@@ -55,11 +55,7 @@ GnuPGWKSMessagePart::ConfirmationType GnuPGWKSMessagePart::stringToType(const QS
void
GnuPGWKSMessagePart
::
parseContent
(
KMime
::
Content
*
node
)
{
const
auto
text
=
QString
::
fromUtf8
(
node
->
decodedContent
());
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const
auto
lines
=
text
.
split
(
QLatin1Char
(
'\n'
),
QString
::
SkipEmptyParts
);
#else
const
auto
lines
=
text
.
split
(
QLatin1Char
(
'\n'
),
Qt
::
SkipEmptyParts
);
#endif
// https://tools.ietf.org/id/draft-koch-openpgp-webkey-service-02.txt
// sections 4.3 and 4.4
for
(
const
auto
&
line
:
lines
)
{
...
...
plugins/messageviewerplugins/externalscriptplugin/viewerpluginexternalscriptinterface.cpp
View file @
6fcdcf7f
...
...
@@ -71,11 +71,7 @@ void ViewerPluginExternalscriptInterface::execute()
KMessageBox
::
error
(
nullptr
,
i18n
(
"
\'
%1
\'
not found"
,
executable
),
i18n
(
"Executable not found."
));
}
else
{
QProcess
proc
;
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const
QStringList
newCommandLine
=
mCurrentInfo
.
at
(
0
).
split
(
QLatin1Char
(
' '
),
QString
::
SkipEmptyParts
);
#else
const
QStringList
newCommandLine
=
mCurrentInfo
.
at
(
0
).
split
(
QLatin1Char
(
' '
),
Qt
::
SkipEmptyParts
);
#endif
const
QStringList
splitArguments
=
adaptArguments
(
newCommandLine
);
if
(
!
proc
.
startDetached
(
executablePath
,
splitArguments
))
{
KMessageBox
::
error
(
nullptr
,
i18n
(
"Impossible to start executable"
));
...
...
plugins/webengineurlinterceptor/adblock/lib/adblockrule.cpp
View file @
6fcdcf7f
...
...
@@ -372,11 +372,7 @@ void AdBlockRule::parseFilter()
// Parse all options following $ char
int
optionsIndex
=
parsedLine
.
indexOf
(
QLatin1Char
(
'$'
));
if
(
optionsIndex
>=
0
)
{
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const
QStringList
options
=
parsedLine
.
mid
(
optionsIndex
+
1
).
split
(
QLatin1Char
(
','
),
QString
::
SkipEmptyParts
);
#else
const
QStringList
options
=
parsedLine
.
mid
(
optionsIndex
+
1
).
split
(
QLatin1Char
(
','
),
Qt
::
SkipEmptyParts
);
#endif
int
handledOptions
=
0
;
for
(
const
QString
&
option
:
options
)
{
...
...
@@ -500,11 +496,7 @@ void AdBlockRule::parseFilter()
void
AdBlockRule
::
parseDomains
(
const
QString
&
domains
,
QChar
separator
)
{
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const
QStringList
domainsList
=
domains
.
split
(
separator
,
QString
::
SkipEmptyParts
);
#else
const
QStringList
domainsList
=
domains
.
split
(
separator
,
Qt
::
SkipEmptyParts
);
#endif
for
(
const
QString
&
domain
:
domainsList
)
{
if
(
domain
.
isEmpty
())
{
...
...
plugins/webengineurlinterceptor/adblock/lib/widgets/adblockautomaticruleslistwidget.cpp
View file @
6fcdcf7f
...
...
@@ -59,11 +59,7 @@ void AdBlockAutomaticRulesListWidget::setDisabledRules(const QStringList &disabl
void
AdBlockAutomaticRulesListWidget
::
setRules
(
const
QString
&
rules
)
{
clear
();
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const
QStringList
lst
=
rules
.
split
(
QLatin1Char
(
'\n'
),
QString
::
SkipEmptyParts
);
#else
const
QStringList
lst
=
rules
.
split
(
QLatin1Char
(
'\n'
),
Qt
::
SkipEmptyParts
);
#endif
for
(
const
QString
&
rule
:
lst
)
{
createItem
(
rule
);
}
...
...
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