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

siteinfo: port foreach -> range-based for

Signed-off-by: Juraj Oravec <sgd.orava@gmail.com>
This commit is contained in:
Juraj Oravec 2019-12-30 18:02:07 +01:00
parent 8bc38860bf
commit d242ac51ab
No known key found for this signature in database
GPG Key ID: 63ACB65056BC8D07

View File

@ -75,7 +75,7 @@ SiteInfo::SiteInfo(WebView *view)
// Meta
m_view->page()->runJavaScript(Scripts::getAllMetaAttributes(), WebPage::SafeJsWorld, [this](const QVariant &res) {
const QVariantList &list = res.toList();
Q_FOREACH (const QVariant &val, list) {
for (const QVariant &val : list) {
const QVariantMap &meta = val.toMap();
QString content = meta.value(QSL("content")).toString();
QString name = meta.value(QSL("name")).toString();
@ -96,7 +96,7 @@ SiteInfo::SiteInfo(WebView *view)
// Images
m_view->page()->runJavaScript(Scripts::getAllImages(), WebPage::SafeJsWorld, [this](const QVariant &res) {
const QVariantList &list = res.toList();
Q_FOREACH (const QVariant &val, list) {
for (const QVariant &val : list) {
const QVariantMap &img = val.toMap();
QString src = img.value(QSL("src")).toString();
QString alt = img.value(QSL("alt")).toString();