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

Use reference in range for loops

Signed-off-by: Juraj Oravec <jurajoravec@mailo.com>
This commit is contained in:
Juraj Oravec 2024-06-15 12:27:24 +02:00
parent e4a8ad5e01
commit 5bbe416b22
Signed by: SGOrava
GPG Key ID: 13660A3F1D9F093B
2 changed files with 2 additions and 2 deletions

View File

@ -215,7 +215,7 @@ void SearchEnginesManager::engineChangedImage()
return; return;
} }
for (Engine e : std::as_const(m_allEngines)) { for (const Engine &e : std::as_const(m_allEngines)) {
if (e.name == engine->name() && if (e.name == engine->name() &&
e.url.contains(engine->searchUrl(QSL("%s")).toString()) && e.url.contains(engine->searchUrl(QSL("%s")).toString()) &&
!engine->image().isNull() !engine->image().isNull()

View File

@ -74,7 +74,7 @@ QList<QObject*> QmlCookies::getAll(const QVariantMap &map)
const bool secure = map.value(QSL("secure")).toBool(); const bool secure = map.value(QSL("secure")).toBool();
const bool session = map.value(QSL("session")).toBool(); const bool session = map.value(QSL("session")).toBool();
QVector<QNetworkCookie> cookies = mApp->cookieJar()->getAllCookies(); QVector<QNetworkCookie> cookies = mApp->cookieJar()->getAllCookies();
for (QNetworkCookie cookie : std::as_const(cookies)) { for (const QNetworkCookie &cookie : std::as_const(cookies)) {
if ((!map.contains(QSL("name")) || QString::fromUtf8(cookie.name()) == name) if ((!map.contains(QSL("name")) || QString::fromUtf8(cookie.name()) == name)
&& (!map.contains(QSL("url")) || cookie.domain() == url) && (!map.contains(QSL("url")) || cookie.domain() == url)
&& (!map.contains(QSL("path")) || cookie.path() == path) && (!map.contains(QSL("path")) || cookie.path() == path)