Commit d20f26ff authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Make it compile against last qt5.15

parent 5a8aec30
......@@ -185,7 +185,11 @@ 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;
......
......@@ -180,7 +180,11 @@ 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;
......
......@@ -163,7 +163,11 @@ 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;
......
......@@ -86,7 +86,11 @@ 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);
......
......@@ -285,7 +285,11 @@ 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) {
......
......@@ -149,7 +149,11 @@ 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