From ac6703215ba5e152379173ba503f5ba3bd7e8a85 Mon Sep 17 00:00:00 2001 From: Thomas Braxton Date: Wed, 11 Jun 2014 08:40:44 -0500 Subject: 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 --- src/core/ksharedconfig.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/core/ksharedconfig.cpp') 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::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(list)) { + if (cfg->name() == fileName && + cfg->d_ptr->openFlags == flags && + cfg->locationType() == resType +// cfg->backend()->type() == backend ) { - return KSharedConfigPtr(*it); + return KSharedConfigPtr(cfg); } } } -- cgit v1.2.1