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:
parent
e4a8ad5e01
commit
5bbe416b22
|
@ -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()
|
||||||
|
|
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user