Commit b28a2b08 authored by Laurent Montel's avatar Laurent Montel 😁

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

parent 698a34ae
Pipeline #47725 passed with stage
in 13 minutes and 26 seconds
......@@ -167,11 +167,7 @@ void FilterBalsa::importFiles(const QString &dirName)
_path = i18nc("define folder name where we import evolution mails", "Evolution-Import");
QString _tmp = dir.filePath(*mailFile);
_tmp.remove(mailDir(), Qt::CaseSensitive);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList subFList = _tmp.split(QLatin1Char('/'), QString::SkipEmptyParts);
#else
QStringList subFList = _tmp.split(QLatin1Char('/'), Qt::SkipEmptyParts);
#endif
QStringList::ConstIterator end(subFList.end());
for (QStringList::ConstIterator it = subFList.constBegin(); it != end; ++it) {
QString _cat = *it;
......
......@@ -164,11 +164,7 @@ void FilterEvolution_v3::importFiles(const QString &dirName)
_path = i18nc("define folder name where we import evolution mails", "Evolution-Import");
QString _tmp = dir.filePath(*mailFile);
_tmp.remove(mailDir(), Qt::CaseSensitive);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList subFList = _tmp.split(QLatin1Char('/'), QString::SkipEmptyParts);
#else
QStringList subFList = _tmp.split(QLatin1Char('/'), Qt::SkipEmptyParts);
#endif
QStringList::ConstIterator end(subFList.end());
for (QStringList::ConstIterator it = subFList.constBegin(); it != end; ++it) {
QString _cat = *it;
......
......@@ -151,11 +151,7 @@ void FilterKMail_maildir::importFiles(const QString &dirName)
_path = QStringLiteral("KMail-Import");
QString _tmp = dir.filePath(*mailFile);
_tmp.remove(mailDir(), Qt::CaseSensitive);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const QStringList subFList = _tmp.split(QLatin1Char('/'), QString::SkipEmptyParts);
#else
const QStringList subFList = _tmp.split(QLatin1Char('/'), Qt::SkipEmptyParts);
#endif
QStringList::ConstIterator end(subFList.end());
for (QStringList::ConstIterator it = subFList.constBegin(); it != end; ++it) {
QString _cat = *it;
......
......@@ -71,11 +71,7 @@ void FilterMailApp::importMails(const QString &maildir)
} else {
QFileInfo filenameInfo(*filename);
qCDebug(MAILIMPORTER_LOG) << "importing filename" << *filename;
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList name = (*filename).split(QLatin1Char('/'), QString::SkipEmptyParts);
#else
QStringList name = (*filename).split(QLatin1Char('/'), Qt::SkipEmptyParts);
#endif
QString folderName(name[name.count() - 2]);
filterInfo()->setCurrent(0);
......
......@@ -283,11 +283,7 @@ bool FilterPMail::parseFolderMatrix(const QString &chosendir)
}
QString tmpArray[5];
tmpRead.remove(tmpRead.length() - 2, 2);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList tmpList = QString::fromLatin1(tmpRead).split(QLatin1Char(','), QString::SkipEmptyParts);
#else
QStringList tmpList = QString::fromLatin1(tmpRead).split(QLatin1Char(','), Qt::SkipEmptyParts);
#endif
int i = 0;
QStringList::ConstIterator end(tmpList.constEnd());
for (QStringList::ConstIterator it = tmpList.constBegin(); it != end; ++it, ++i) {
......
......@@ -135,11 +135,7 @@ Akonadi::Collection FilterImporterAkonadi::parseFolderString(const QString &fold
}
// The folder hasn't yet been created, create it now.
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const QStringList folderList = folderParseString.split(QLatin1Char('/'), QString::SkipEmptyParts);
#else
const QStringList folderList = folderParseString.split(QLatin1Char('/'), Qt::SkipEmptyParts);
#endif
bool isFirst = true;
QString folderBuilder;
Akonadi::Collection lastCollection;
......
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