Commit 1565bb57 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

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

parent 2ffa21ba
Pipeline #47744 passed with stage
in 12 minutes and 44 seconds
......@@ -173,11 +173,7 @@ void ProcessControl::start()
const QString valgrindOptions = akGetEnv("AKONADI_VALGRIND_OPTIONS");
if (!valgrindOptions.isEmpty()) {
mArguments = valgrindOptions.split(QLatin1Char(' '),
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QString::SkipEmptyParts
#else
Qt::SkipEmptyParts
#endif
) << mArguments;
}
......
......@@ -156,11 +156,7 @@ void PluginLoader::scan()
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);
#else
const QStringList mimeTypes = type.split(QLatin1Char(','), Qt::SkipEmptyParts);
#endif
qCDebug(AKONADICORE_LOG) << "registering Desktop file" << entry << "for" << mimeTypes << '@' << classes;
for (const QString &mimeType : mimeTypes) {
......
......@@ -36,11 +36,7 @@ Collection HandlerHelper::collectionFromIdOrName(const QByteArray &id)
// id is a path
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);
#else
const QStringList pathParts = path.split(QLatin1Char('/'), Qt::SkipEmptyParts);
#endif
Collection col;
for (const QString &part : pathParts) {
......
......@@ -470,11 +470,7 @@ bool DbConfigMysql::startInternalServer()
}
const QString version = query.value(0).toString();
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const QStringList versions = version.split(QLatin1Char('.'), QString::SkipEmptyParts);
#else
const QStringList versions = version.split(QLatin1Char('.'), Qt::SkipEmptyParts);
#endif
if (versions.count() < 3) {
qCCritical(AKONADISERVER_LOG) << "Invalid database server version: " << version;
return false;
......
......@@ -17,11 +17,7 @@ using namespace Akonadi::Server;
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);
#else
const QStringList name = fqName.split(QLatin1Char(':'), Qt::SkipEmptyParts);
#endif
if (name.size() != 2) {
throw PartTypeException("Invalid part type name.");
}
......
......@@ -102,13 +102,8 @@ QVector&lt;TableDescription&gt; <xsl:value-of select="$className"/>::tables()
t.data.reserve(<xsl:value-of select="count(data)"/>);
<xsl:for-each select="data">
{
#if QT_VERSION &lt; QT_VERSION_CHECK(5, 15, 0)
const QStringList columns = QStringLiteral("<xsl:value-of select="@columns"/>").split( QLatin1Char( ',' ), QString::SkipEmptyParts );
const QStringList values = QStringLiteral("<xsl:value-of select="@values"/>").split( QLatin1Char( ',' ), QString::SkipEmptyParts );
#else
const QStringList columns = QStringLiteral("<xsl:value-of select="@columns"/>").split( QLatin1Char( ',' ), Qt::SkipEmptyParts );
const QStringList values = QStringLiteral("<xsl:value-of select="@values"/>").split( QLatin1Char( ',' ), Qt::SkipEmptyParts );
#endif
Q_ASSERT( columns.count() == values.count() );
DataDescription d;
......
......@@ -25,11 +25,7 @@
{
IndexDescription idx;
idx.name = QStringLiteral("<xsl:value-of select="@name"/>");
#if QT_VERSION &lt; QT_VERSION_CHECK(5, 15, 0)
idx.columns = QStringLiteral("<xsl:value-of select="@columns"/>").split(QLatin1Char( ',' ), QString::SkipEmptyParts);
#else
idx.columns = QStringLiteral("<xsl:value-of select="@columns"/>").split(QLatin1Char( ',' ), Qt::SkipEmptyParts);
#endif
<xsl:if test="@unique">
idx.isUnique = <xsl:value-of select="@unique"/>;
</xsl:if>
......
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