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

network: port foreach -> range-based for

Signed-off-by: Juraj Oravec <sgd.orava@gmail.com>
This commit is contained in:
Juraj Oravec 2019-12-30 20:59:30 +01:00
parent 991e0b952e
commit 9b6f187282
No known key found for this signature in database
GPG Key ID: 63ACB65056BC8D07
2 changed files with 6 additions and 4 deletions

View File

@ -58,7 +58,7 @@ void NetworkUrlInterceptor::interceptRequest(QWebEngineUrlRequestInfo &info)
}
}
foreach (UrlInterceptor *interceptor, m_interceptors) {
for (UrlInterceptor *interceptor : qAsConst(m_interceptors)) {
interceptor->interceptRequest(info);
}
}

View File

@ -358,7 +358,7 @@ QString FalkonSchemeReply::configPage()
QString pluginsString;
const QList<Plugins::Plugin> &availablePlugins = mApp->plugins()->availablePlugins();
foreach (const Plugins::Plugin &plugin, availablePlugins) {
for (const Plugins::Plugin &plugin : availablePlugins) {
PluginSpec spec = plugin.pluginSpec;
pluginsString.append(QString("<tr><td>%1</td><td>%2</td><td>%3</td><td>%4</td></tr>").arg(
spec.name, spec.version, spec.author.toHtmlEscaped(), spec.description));
@ -372,11 +372,13 @@ QString FalkonSchemeReply::configPage()
QString allGroupsString;
QSettings* settings = Settings::globalSettings();
foreach (const QString &group, settings->childGroups()) {
const auto groups = settings->childGroups();
for (const QString &group : groups) {
QString groupString = QString("<tr><th colspan=\"2\">[%1]</th></tr>").arg(group);
settings->beginGroup(group);
foreach (const QString &key, settings->childKeys()) {
const auto keys = settings->childKeys();
for (const QString &key : keys) {
const QVariant keyValue = settings->value(key);
QString keyString;