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

We depend against qt5.15

parent 4a9af00a
......@@ -136,11 +136,7 @@ void Archiver::setKeptBackups(int num)
void Archiver::setFilter(const QString &filter)
{
filters.clear();
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const QStringList list = filter.split(QLatin1Char(' '), QString::SkipEmptyParts);
#else
const QStringList list = filter.split(QLatin1Char(' '), Qt::SkipEmptyParts);
#endif
filters.reserve(list.count());
for (const QString &str : list)
filters.append(QRegExp(str, Qt::CaseSensitive, QRegExp::Wildcard));
......@@ -164,11 +160,7 @@ QString Archiver::getFilter() const
void Archiver::setDirFilter(const QString &filter)
{
dirFilters.clear();
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
const QStringList list = filter.split(QLatin1Char('\n'), QString::SkipEmptyParts);
#else
const QStringList list = filter.split(QLatin1Char('\n'), Qt::SkipEmptyParts);
#endif
for (const QString &str : list)
{
QString expr = str.trimmed();
......@@ -566,11 +558,7 @@ bool Archiver::createArchive(const QStringList &includes, const QStringList &exc
for (const QString &fileName : entryList)
{
KIO::UDSEntry entry;
#if (KIO_VERSION >= QT_VERSION_CHECK(5, 48, 0))
entry.fastInsert(KIO::UDSEntry::UDS_NAME, fileName);
#else
entry.insert(KIO::UDSEntry::UDS_NAME, fileName);
#endif
targetDirList.append(entry);
}
jobResult = 0;
......
......@@ -514,11 +514,7 @@ void Selector::setBackupList(const QStringList &includes, const QStringList &exc
QStandardItem *Selector::findItemByPath(const QString &path)
{
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList items = path.split(QLatin1Char('/'), QString::SkipEmptyParts);
#else
QStringList items = path.split(QLatin1Char('/'), Qt::SkipEmptyParts);
#endif
QStandardItem *item = itemModel->invisibleRootItem()->child(0);
for (int i = 0; i < items.count(); i++)
......
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