mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
siteinfo: port foreach -> range-based for
Signed-off-by: Juraj Oravec <sgd.orava@gmail.com>
This commit is contained in:
parent
8bc38860bf
commit
d242ac51ab
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user