1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 02:36:34 +01:00

CookieManager: port foreach -> range-based for

Signed-off-by: Juraj Oravec <sgd.orava@gmail.com>
This commit is contained in:
Juraj Oravec 2019-12-30 17:50:55 +01:00
parent 169f7cba65
commit 1457cfc1fd
No known key found for this signature in database
GPG Key ID: 63ACB65056BC8D07

View File

@ -96,8 +96,10 @@ CookieManager::CookieManager(QWidget *parent)
connect(mApp->cookieJar(), &CookieJar::cookieRemoved, this, &CookieManager::removeCookie);
// Load cookies
foreach (const QNetworkCookie &cookie, mApp->cookieJar()->getAllCookies())
const auto allCookies = mApp->cookieJar()->getAllCookies();
for (const QNetworkCookie &cookie : allCookies) {
addCookie(cookie);
}
QzTools::setWmClass("Cookies", this);
}
@ -137,7 +139,7 @@ void CookieManager::remove()
}
}
foreach (const QNetworkCookie &cookie, cookies) {
for (const QNetworkCookie &cookie : qAsConst(cookies)) {
mApp->cookieJar()->deleteCookie(cookie);
}
}