aboutsummaryrefslogtreecommitdiff
path: root/src/core/ksharedconfig.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/ksharedconfig.cpp')
-rw-r--r--src/core/ksharedconfig.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/ksharedconfig.cpp b/src/core/ksharedconfig.cpp
index 34947065..f4b4c766 100644
--- a/src/core/ksharedconfig.cpp
+++ b/src/core/ksharedconfig.cpp
@@ -72,13 +72,13 @@ KSharedConfigPtr KSharedConfig::openConfig(const QString &_fileName,
}
if (list) {
- for (QList<KSharedConfig *>::ConstIterator it = list->constBegin(); it != list->constEnd(); ++it) {
- if ((*it)->name() == fileName &&
- (*it)->d_ptr->openFlags == flags &&
- (*it)->locationType() == resType
-// (*it)->backEnd()->type() == backEnd
+ foreach (auto cfg, *static_cast<const GlobalSharedConfigList*>(list)) {
+ if (cfg->name() == fileName &&
+ cfg->d_ptr->openFlags == flags &&
+ cfg->locationType() == resType
+// cfg->backend()->type() == backend
) {
- return KSharedConfigPtr(*it);
+ return KSharedConfigPtr(cfg);
}
}
}