Set minimum Qt version to 5.4, remove ugly ifdefs

parent 5ba8445f
......@@ -36,7 +36,7 @@ include(KDECMakeSettings)
include(KDECompilerSettings NO_POLICY_SCOPE)
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED Core Widgets)
find_package(Qt5 5.4 CONFIG REQUIRED Core Widgets)
find_package(KF5 REQUIRED
KIO
Parts
......
......@@ -115,11 +115,7 @@ bool ScanManager::start(const QUrl &url)
qDebug() << "Cache-(a)hit: " << cachePath;
#if QT_VERSION >= 0x050400
QVector<QStringRef> split = path.midRef(cachePath.length()).split(QLatin1Char( '/' ));
#else
QStringList split = path.mid(cachePath.length()).split(QLatin1Char( '/' ));
#endif
Folder *d = *it;
Iterator<File> jt;
......@@ -128,16 +124,9 @@ bool ScanManager::start(const QUrl &url)
jt = d->iterator();
const Link<File> *end = d->end();
#if QT_VERSION >= 0x050400
if (split.first().isEmpty()) //found the dir
break;
QString s = split.first() % QLatin1Char( '/' );
#else
QString s = split.first();
if (s.isEmpty()) //found the dir
break;
s += QLatin1Char( '/' );
#endif
for (d = 0; jt != end; ++jt)
if (s == (*jt)->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