Commit 0c95eeac authored by Laurent Montel's avatar Laurent Montel 😁

QString::split(..., Qt::SplitBehavior, ...) is already in Qt 5.14

parent b234e389
Pipeline #47737 canceled with stage
......@@ -872,11 +872,7 @@ void POP3Protocol::get(const QUrl &url)
finished();
//m_cmd = CMD_NONE;
} else if (cmd == QLatin1String("download") || cmd == QLatin1String("headers")) {
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const QStringList waitingCommands = path.split(QLatin1Char(','), QString::SkipEmptyParts);
#else
const QStringList waitingCommands = path.split(QLatin1Char(','), Qt::SkipEmptyParts);
#endif
if (waitingCommands.isEmpty()) {
qCDebug(POP3_LOG) << "tried to request" << cmd << "for" << path << "with no specific item to get";
closeConnection();
......
......@@ -26,11 +26,7 @@ static const QMap<QString, QCA::CertificateInfoTypeKnown> stringToKnownCertInfoT
static QMultiMap<QCA::CertificateInfoType, QString> parseCertSubjectInfo(const QString &info)
{
QMultiMap<QCA::CertificateInfoType, QString> map;
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
for (const auto &token : info.split(QLatin1Char(','), QString::SkipEmptyParts)) {
#else
for (const auto &token : info.split(QLatin1Char(','), Qt::SkipEmptyParts)) {
#endif
const auto keyval = token.trimmed().split(QLatin1Char('='));
if (keyval.count() == 2) {
if (stringToKnownCertInfoType.contains(keyval[0])) {
......
......@@ -66,11 +66,7 @@ KGAPI2::AccountPtr GoogleSettings::fetchAccountFromWallet(const QString &account
QMap<QString, QString> map;
m_wallet->readMap(accountName, map);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const QStringList scopes = map[QStringLiteral("scopes")].split(QLatin1Char(','), QString::SkipEmptyParts);
#else
const QStringList scopes = map[QStringLiteral("scopes")].split(QLatin1Char(','), Qt::SkipEmptyParts);
#endif
QList<QUrl> scopeUrls;
scopeUrls.reserve(scopes.count());
for (const QString &scope : scopes) {
......
......@@ -110,11 +110,7 @@ Akonadi::Collection ImapTestBase::createCollectionChain(const QString &remoteId)
Akonadi::Collection collection = parent;
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const QStringList collections = remoteId.split(separator, QString::SkipEmptyParts);
#else
const QStringList collections = remoteId.split(separator, Qt::SkipEmptyParts);
#endif
Q_FOREACH (const QString &colId, collections) {
collection = Akonadi::Collection(id);
collection.setRemoteId(separator + colId);
......
......@@ -765,11 +765,7 @@ Kolab::Contact fromKABC(const KContacts::Addressee &addressee)
Kolab::Crypto crypto;
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const QStringList protocolPrefs = addressee.custom(QStringLiteral("KADDRESSBOOK"), QStringLiteral("CRYPTOPROTOPREF")).split(QLatin1Char(','), QString::SkipEmptyParts);
#else
const QStringList protocolPrefs = addressee.custom(QStringLiteral("KADDRESSBOOK"), QStringLiteral("CRYPTOPROTOPREF")).split(QLatin1Char(','), Qt::SkipEmptyParts);
#endif
const uint cryptoFormats = stringListToCryptoMessageFormats(protocolPrefs);
int formats = 0;
if (cryptoFormats & InlineOpenPGPFormat) {
......
......@@ -129,11 +129,7 @@ void KolabBase::saveTo(KContacts::Addressee *addressee) const
{
addressee->setUid(uid());
addressee->setNote(body());
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
addressee->setCategories(categories().split(QLatin1Char(','), QString::SkipEmptyParts));
#else
addressee->setCategories(categories().split(QLatin1Char(','), Qt::SkipEmptyParts));
#endif
if (mTimeZone.isValid()) {
addressee->setRevision(lastModified().toTimeZone(mTimeZone));
}
......
......@@ -141,11 +141,7 @@ MessageStatus &KMIndexData::status()
QStringList KMIndexData::tagList() const
{
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
return mCachedStringParts[KMIndexReader::MsgTagPart].split(QLatin1Char(','), QString::SkipEmptyParts);
#else
return mCachedStringParts[KMIndexReader::MsgTagPart].split(QLatin1Char(','), Qt::SkipEmptyParts);
#endif
}
quint64 KMIndexData::uid() const
......
......@@ -188,11 +188,7 @@ void FakeServer::setAllowedDeletions(const QString &deleteIds)
{
QMutexLocker locker(&mMutex);
mAllowedDeletions.clear();
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const QStringList ids = deleteIds.split(QLatin1Char(','), QString::SkipEmptyParts);
#else
const QStringList ids = deleteIds.split(QLatin1Char(','), Qt::SkipEmptyParts);
#endif
for (const QString &id : ids) {
mAllowedDeletions.append(id.toUtf8());
}
......@@ -202,11 +198,7 @@ void FakeServer::setAllowedRetrieves(const QString &retrieveIds)
{
QMutexLocker locker(&mMutex);
mAllowedRetrieves.clear();
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const QStringList ids = retrieveIds.split(QLatin1Char(','), QString::SkipEmptyParts);
#else
const QStringList ids = retrieveIds.split(QLatin1Char(','), Qt::SkipEmptyParts);
#endif
for (const QString &id : ids) {
mAllowedRetrieves.append(id.toUtf8());
}
......@@ -227,11 +219,7 @@ void FakeServer::setNextConversation(const QString &conversation, const QList<in
Q_ASSERT(!conversation.isEmpty());
mGotDisconnected = false;
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList lines = conversation.split(QStringLiteral("\r\n"), QString::SkipEmptyParts);
#else
QStringList lines = conversation.split(QStringLiteral("\r\n"), Qt::SkipEmptyParts);
#endif
Q_ASSERT(lines.first().startsWith(QLatin1String("C:")));
enum Mode {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment