1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 01:22:10 +01:00

Port deprecated enum

This commit is contained in:
Laurent Montel 2022-06-22 07:51:18 +02:00
parent 13092decbb
commit 271c5f8a6b
8 changed files with 10 additions and 10 deletions

View File

@ -417,7 +417,7 @@ void AdBlockRule::parseFilter()
// Parse all options following $ char // Parse all options following $ char
int optionsIndex = parsedLine.indexOf(QL1C('$')); int optionsIndex = parsedLine.indexOf(QL1C('$'));
if (optionsIndex >= 0) { 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; int handledOptions = 0;
for (const QString &option : options) { for (const QString &option : options) {
@ -605,7 +605,7 @@ void AdBlockRule::parseFilter()
void AdBlockRule::parseDomains(const QString &domains, const QChar &separator) 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) { for (const QString domain : domainsList) {
if (domain.isEmpty()) { if (domain.isEmpty()) {

View File

@ -276,7 +276,7 @@ int LocationCompleterDelegate::viewItemDrawText(QPainter *p, const QStyleOptionV
if (!searchText.isEmpty()) { if (!searchText.isEmpty()) {
QList<int> delimiters; QList<int> delimiters;
QStringList searchStrings = searchText.split(QLatin1Char(' '), QString::SkipEmptyParts); QStringList searchStrings = searchText.split(QLatin1Char(' '), Qt::SkipEmptyParts);
// Look for longer parts first // Look for longer parts first
std::sort(searchStrings.begin(), searchStrings.end(), sizeBiggerThan); std::sort(searchStrings.begin(), searchStrings.end(), sizeBiggerThan);

View File

@ -106,7 +106,7 @@ QSqlQuery LocationCompleterModel::createHistoryQuery(const QString &searchString
query.append(QLatin1String("title LIKE ? OR url LIKE ? ")); query.append(QLatin1String("title LIKE ? OR url LIKE ? "));
} }
else { else {
searchList = searchString.split(QLatin1Char(' '), QString::SkipEmptyParts); searchList = searchString.split(QLatin1Char(' '), Qt::SkipEmptyParts);
const int slSize = searchList.size(); const int slSize = searchList.size();
for (int i = 0; i < slSize; ++i) { for (int i = 0; i < slSize; ++i) {
query.append(QLatin1String("(title LIKE ? OR url LIKE ?) ")); query.append(QLatin1String("(title LIKE ? OR url LIKE ?) "));

View File

@ -228,7 +228,7 @@ QString SpeedDial::initialScript()
void SpeedDial::changed(const QString &allPages) 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(); m_pages.clear();
for (const QString &entry : entries) { for (const QString &entry : entries) {
@ -236,7 +236,7 @@ void SpeedDial::changed(const QString &allPages)
continue; continue;
} }
const QStringList tmp = entry.split(QLatin1String("\"|"), QString::SkipEmptyParts); const QStringList tmp = entry.split(QLatin1String("\"|"), Qt::SkipEmptyParts);
if (tmp.count() != 2) { if (tmp.count() != 2) {
continue; continue;
} }

View File

@ -517,7 +517,7 @@ QString QzTools::resolveFromPath(const QString &name)
return {}; return {};
} }
const QStringList dirs = path.split(QLatin1Char(':'), QString::SkipEmptyParts); const QStringList dirs = path.split(QLatin1Char(':'), Qt::SkipEmptyParts);
for (const QString &dir : dirs) { for (const QString &dir : dirs) {
QDir d(dir); QDir d(dir);

View File

@ -411,7 +411,7 @@ void FCM_Plugin::insertFlashCookie(const QString &path)
} }
QString fileStr = QString(file); 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); QFileInfo solFileInfo(solFile);

View File

@ -185,7 +185,7 @@ void TabManagerDelegate::viewItemDrawText(QPainter *p, const QStyleOptionViewIte
if (!searchText.isEmpty()) { if (!searchText.isEmpty()) {
QList<int> delimiters; QList<int> delimiters;
QStringList searchStrings = searchText.split(QLatin1Char(' '), QString::SkipEmptyParts); QStringList searchStrings = searchText.split(QLatin1Char(' '), Qt::SkipEmptyParts);
// Look for longer parts first // Look for longer parts first
std::sort(searchStrings.begin(), searchStrings.end(), sizeBiggerThan); std::sort(searchStrings.begin(), searchStrings.end(), sizeBiggerThan);

View File

@ -30,7 +30,7 @@ VerticalTabsSchemeHandler::VerticalTabsSchemeHandler(QObject *parent)
void VerticalTabsSchemeHandler::requestStarted(QWebEngineUrlRequestJob *job) 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.isEmpty()) {
if (parts.at(0) == QL1S("group")) { if (parts.at(0) == QL1S("group")) {
setReply(job, QByteArrayLiteral("text/html"), groupPage()); setReply(job, QByteArrayLiteral("text/html"), groupPage());