Commit 65cdffbb authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Make it compile against qt5.15

parent fcc9ca20
......@@ -136,7 +136,11 @@ void Archiver::setKeptBackups(int num)
void Archiver::setFilter(const QString &filter)
{
filters.clear();
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList list = filter.split(QLatin1Char(' '), QString::SkipEmptyParts);
#else
QStringList list = filter.split(QLatin1Char(' '), Qt::SkipEmptyParts);
#endif
foreach (const QString &str, list)
filters.append(QRegExp(str, Qt::CaseSensitive, QRegExp::Wildcard));
}
......@@ -159,7 +163,11 @@ QString Archiver::getFilter() const
void Archiver::setDirFilter(const QString &filter)
{
dirFilters.clear();
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QStringList list = filter.split(QLatin1Char('\n'), QString::SkipEmptyParts);
#else
QStringList list = filter.split(QLatin1Char('\n'), Qt::SkipEmptyParts);
#endif
foreach (const QString &str, list)
{
QString expr = str.trimmed();
......
......@@ -504,7 +504,11 @@ 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