From 271c5f8a6bbb2b30fda9132b2225236fc78b4697 Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Wed, 22 Jun 2022 07:51:18 +0200 Subject: [PATCH] Port deprecated enum --- src/lib/adblock/adblockrule.cpp | 4 ++-- src/lib/navigation/completer/locationcompleterdelegate.cpp | 2 +- src/lib/navigation/completer/locationcompletermodel.cpp | 2 +- src/lib/plugins/speeddial.cpp | 4 ++-- src/lib/tools/qztools.cpp | 2 +- src/plugins/FlashCookieManager/fcm_plugin.cpp | 2 +- src/plugins/TabManager/tabmanagerdelegate.cpp | 2 +- src/plugins/VerticalTabs/verticaltabsschemehandler.cpp | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/lib/adblock/adblockrule.cpp b/src/lib/adblock/adblockrule.cpp index 05fe7cc7f..59e24d18e 100644 --- a/src/lib/adblock/adblockrule.cpp +++ b/src/lib/adblock/adblockrule.cpp @@ -417,7 +417,7 @@ void AdBlockRule::parseFilter() // Parse all options following $ char int optionsIndex = parsedLine.indexOf(QL1C('$')); if (optionsIndex >= 0) { - const QStringList options = parsedLine.mid(optionsIndex + 1).split(QL1C(','), QString::SkipEmptyParts); + const QStringList options = parsedLine.mid(optionsIndex + 1).split(QL1C(','), Qt::SkipEmptyParts); int handledOptions = 0; for (const QString &option : options) { @@ -605,7 +605,7 @@ void AdBlockRule::parseFilter() void AdBlockRule::parseDomains(const QString &domains, const QChar &separator) { - const QStringList domainsList = domains.split(separator, QString::SkipEmptyParts); + const QStringList domainsList = domains.split(separator, Qt::SkipEmptyParts); for (const QString domain : domainsList) { if (domain.isEmpty()) { diff --git a/src/lib/navigation/completer/locationcompleterdelegate.cpp b/src/lib/navigation/completer/locationcompleterdelegate.cpp index d361ce39c..f4c9dde93 100644 --- a/src/lib/navigation/completer/locationcompleterdelegate.cpp +++ b/src/lib/navigation/completer/locationcompleterdelegate.cpp @@ -276,7 +276,7 @@ int LocationCompleterDelegate::viewItemDrawText(QPainter *p, const QStyleOptionV if (!searchText.isEmpty()) { QList delimiters; - QStringList searchStrings = searchText.split(QLatin1Char(' '), QString::SkipEmptyParts); + QStringList searchStrings = searchText.split(QLatin1Char(' '), Qt::SkipEmptyParts); // Look for longer parts first std::sort(searchStrings.begin(), searchStrings.end(), sizeBiggerThan); diff --git a/src/lib/navigation/completer/locationcompletermodel.cpp b/src/lib/navigation/completer/locationcompletermodel.cpp index a69493bc1..32925f903 100644 --- a/src/lib/navigation/completer/locationcompletermodel.cpp +++ b/src/lib/navigation/completer/locationcompletermodel.cpp @@ -106,7 +106,7 @@ QSqlQuery LocationCompleterModel::createHistoryQuery(const QString &searchString query.append(QLatin1String("title LIKE ? OR url LIKE ? ")); } else { - searchList = searchString.split(QLatin1Char(' '), QString::SkipEmptyParts); + searchList = searchString.split(QLatin1Char(' '), Qt::SkipEmptyParts); const int slSize = searchList.size(); for (int i = 0; i < slSize; ++i) { query.append(QLatin1String("(title LIKE ? OR url LIKE ?) ")); diff --git a/src/lib/plugins/speeddial.cpp b/src/lib/plugins/speeddial.cpp index c734bdc57..d6b89d4db 100644 --- a/src/lib/plugins/speeddial.cpp +++ b/src/lib/plugins/speeddial.cpp @@ -228,7 +228,7 @@ QString SpeedDial::initialScript() void SpeedDial::changed(const QString &allPages) { - const QStringList entries = allPages.split(QLatin1String("\";"), QString::SkipEmptyParts); + const QStringList entries = allPages.split(QLatin1String("\";"), Qt::SkipEmptyParts); m_pages.clear(); for (const QString &entry : entries) { @@ -236,7 +236,7 @@ void SpeedDial::changed(const QString &allPages) continue; } - const QStringList tmp = entry.split(QLatin1String("\"|"), QString::SkipEmptyParts); + const QStringList tmp = entry.split(QLatin1String("\"|"), Qt::SkipEmptyParts); if (tmp.count() != 2) { continue; } diff --git a/src/lib/tools/qztools.cpp b/src/lib/tools/qztools.cpp index 93f71f89b..16214207c 100644 --- a/src/lib/tools/qztools.cpp +++ b/src/lib/tools/qztools.cpp @@ -517,7 +517,7 @@ QString QzTools::resolveFromPath(const QString &name) return {}; } - const QStringList dirs = path.split(QLatin1Char(':'), QString::SkipEmptyParts); + const QStringList dirs = path.split(QLatin1Char(':'), Qt::SkipEmptyParts); for (const QString &dir : dirs) { QDir d(dir); diff --git a/src/plugins/FlashCookieManager/fcm_plugin.cpp b/src/plugins/FlashCookieManager/fcm_plugin.cpp index 459c7c4eb..477562ef0 100644 --- a/src/plugins/FlashCookieManager/fcm_plugin.cpp +++ b/src/plugins/FlashCookieManager/fcm_plugin.cpp @@ -411,7 +411,7 @@ void FCM_Plugin::insertFlashCookie(const QString &path) } QString fileStr = QString(file); - fileStr = fileStr.split(QL1C('.'), QString::SkipEmptyParts).join(QL1S("\n")); + fileStr = fileStr.split(QL1C('.'), Qt::SkipEmptyParts).join(QL1S("\n")); QFileInfo solFileInfo(solFile); diff --git a/src/plugins/TabManager/tabmanagerdelegate.cpp b/src/plugins/TabManager/tabmanagerdelegate.cpp index 7420673a1..1b9e58e86 100644 --- a/src/plugins/TabManager/tabmanagerdelegate.cpp +++ b/src/plugins/TabManager/tabmanagerdelegate.cpp @@ -185,7 +185,7 @@ void TabManagerDelegate::viewItemDrawText(QPainter *p, const QStyleOptionViewIte if (!searchText.isEmpty()) { QList delimiters; - QStringList searchStrings = searchText.split(QLatin1Char(' '), QString::SkipEmptyParts); + QStringList searchStrings = searchText.split(QLatin1Char(' '), Qt::SkipEmptyParts); // Look for longer parts first std::sort(searchStrings.begin(), searchStrings.end(), sizeBiggerThan); diff --git a/src/plugins/VerticalTabs/verticaltabsschemehandler.cpp b/src/plugins/VerticalTabs/verticaltabsschemehandler.cpp index dc3520386..d80053db4 100644 --- a/src/plugins/VerticalTabs/verticaltabsschemehandler.cpp +++ b/src/plugins/VerticalTabs/verticaltabsschemehandler.cpp @@ -30,7 +30,7 @@ VerticalTabsSchemeHandler::VerticalTabsSchemeHandler(QObject *parent) void VerticalTabsSchemeHandler::requestStarted(QWebEngineUrlRequestJob *job) { - const auto parts = job->requestUrl().path().split(QL1C('/'), QString::SkipEmptyParts); + const auto parts = job->requestUrl().path().split(QL1C('/'), Qt::SkipEmptyParts); if (!parts.isEmpty()) { if (parts.at(0) == QL1S("group")) { setReply(job, QByteArrayLiteral("text/html"), groupPage());