diff options
| author | Thomas Braxton <kde.braxton@gmail.com> | 2014-06-11 08:40:44 -0500 |
|---|---|---|
| committer | Thomas Braxton <kde.braxton@gmail.com> | 2014-06-12 17:14:16 -0500 |
| commit | ac6703215ba5e152379173ba503f5ba3bd7e8a85 (patch) | |
| tree | d3072f5a03ec66569d4e2f6770fbaa06090cd98f /src/core/ksharedconfig.cpp | |
| parent | 0ed55dfa5d25bdcbef24f1b06be34467b620ae99 (diff) | |
| download | kconfig-ac6703215ba5e152379173ba503f5ba3bd7e8a85.tar.gz kconfig-ac6703215ba5e152379173ba503f5ba3bd7e8a85.tar.bz2 | |
Simple Cleanups
- use Q_NULLPTR instead of 0 or NULL
- simplify some foreach loops
- use QStringLiteral in a few places
- added a few consts
REVIEW: 118666
Diffstat (limited to 'src/core/ksharedconfig.cpp')
| -rw-r--r-- | src/core/ksharedconfig.cpp | 12 |
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); } } } |
