Commit b603a9dd authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Use range-based for loop

parent 148951e0
......@@ -116,21 +116,19 @@ void KCMKontactSummary::load()
mPluginView->clear();
KPluginInfo::List pluginList = KPluginInfo::fromMetaData(pluginMetaDatas);
KPluginInfo::List::Iterator it;
KPluginInfo::List::Iterator end(pluginList.end());
for (it = pluginList.begin(); it != end; ++it) {
it->setConfig(KConfigGroup(&config, "Plugins"));
it->load();
for (auto plugin : std::as_const(pluginList)) {
plugin.setConfig(KConfigGroup(&config, "Plugins"));
plugin.load();
if (!it->isPluginEnabled()) {
if (!plugin.isPluginEnabled()) {
continue;
}
QVariant var = it->property(QStringLiteral("X-KDE-KontactPluginHasSummary"));
QVariant var = plugin.property(QStringLiteral("X-KDE-KontactPluginHasSummary"));
if (var.isValid() && var.toBool() == true) {
auto item = new PluginItem(*it, mPluginView);
auto item = new PluginItem(plugin, mPluginView);
if (activeSummaries.contains(it->pluginName())) {
if (activeSummaries.contains(plugin.pluginName())) {
item->setCheckState(0, Qt::Checked);
} else {
item->setCheckState(0, Qt::Unchecked);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment