Commit 94f6d456 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Port deprecated method

parent ff6ac0ff
...@@ -190,7 +190,13 @@ void ProcessControl::start() ...@@ -190,7 +190,13 @@ void ProcessControl::start()
const QString valgrindOptions = akGetEnv("AKONADI_VALGRIND_OPTIONS"); const QString valgrindOptions = akGetEnv("AKONADI_VALGRIND_OPTIONS");
if (!valgrindOptions.isEmpty()) { if (!valgrindOptions.isEmpty()) {
mArguments = valgrindOptions.split(QLatin1Char(' '), QString::SkipEmptyParts) << mArguments; mArguments = valgrindOptions.split(QLatin1Char(' '),
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QString::SkipEmptyParts
#else
Qt::SkipEmptyParts
#endif
) << mArguments;
} }
qCDebug(AKONADICONTROL_LOG); qCDebug(AKONADICONTROL_LOG);
......
...@@ -169,7 +169,11 @@ void PluginLoader::scan() ...@@ -169,7 +169,11 @@ void PluginLoader::scan()
qCWarning(AKONADICORE_LOG) << "missing or empty X-KDE-ClassName value in \"" << entry << "\""; qCWarning(AKONADICORE_LOG) << "missing or empty X-KDE-ClassName value in \"" << entry << "\"";
} }
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const QStringList mimeTypes = type.split(QLatin1Char(','), QString::SkipEmptyParts); const QStringList mimeTypes = type.split(QLatin1Char(','), QString::SkipEmptyParts);
#else
const QStringList mimeTypes = type.split(QLatin1Char(','), Qt::SkipEmptyParts);
#endif
qCDebug(AKONADICORE_LOG) << "registering Desktop file" << entry << "for" << mimeTypes << '@' << classes; qCDebug(AKONADICORE_LOG) << "registering Desktop file" << entry << "for" << mimeTypes << '@' << classes;
for (const QString &mimeType : mimeTypes) { for (const QString &mimeType : mimeTypes) {
......
...@@ -49,7 +49,12 @@ Collection HandlerHelper::collectionFromIdOrName(const QByteArray &id) ...@@ -49,7 +49,12 @@ Collection HandlerHelper::collectionFromIdOrName(const QByteArray &id)
// id is a path // id is a path
QString path = QString::fromUtf8(id); // ### should be UTF-7 for real IMAP compatibility QString path = QString::fromUtf8(id); // ### should be UTF-7 for real IMAP compatibility
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const QStringList pathParts = path.split(QLatin1Char('/'), QString::SkipEmptyParts); const QStringList pathParts = path.split(QLatin1Char('/'), QString::SkipEmptyParts);
#else
const QStringList pathParts = path.split(QLatin1Char('/'), Qt::SkipEmptyParts);
#endif
Collection col; Collection col;
for (const QString &part : pathParts) { for (const QString &part : pathParts) {
SelectQueryBuilder<Collection> qb; SelectQueryBuilder<Collection> qb;
......
...@@ -465,7 +465,11 @@ bool DbConfigMysql::startInternalServer() ...@@ -465,7 +465,11 @@ bool DbConfigMysql::startInternalServer()
} }
const QString version = query.value(0).toString(); const QString version = query.value(0).toString();
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const QStringList versions = version.split(QLatin1Char('.'), QString::SkipEmptyParts); const QStringList versions = version.split(QLatin1Char('.'), QString::SkipEmptyParts);
#else
const QStringList versions = version.split(QLatin1Char('.'), Qt::SkipEmptyParts);
#endif
if (versions.count() < 3) { if (versions.count() < 3) {
qCCritical(AKONADISERVER_LOG) << "Invalid database server version: " << version; qCCritical(AKONADISERVER_LOG) << "Invalid database server version: " << version;
return false; return false;
......
...@@ -30,7 +30,11 @@ using namespace Akonadi::Server; ...@@ -30,7 +30,11 @@ using namespace Akonadi::Server;
std::pair<QString, QString> PartTypeHelper::parseFqName(const QString &fqName) std::pair<QString, QString> PartTypeHelper::parseFqName(const QString &fqName)
{ {
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const QStringList name = fqName.split(QLatin1Char(':'), QString::SkipEmptyParts); const QStringList name = fqName.split(QLatin1Char(':'), QString::SkipEmptyParts);
#else
const QStringList name = fqName.split(QLatin1Char(':'), Qt::SkipEmptyParts);
#endif
if (name.size() != 2) { if (name.size() != 2) {
throw PartTypeException("Invalid part type name."); throw PartTypeException("Invalid part type name.");
} }
......
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