From 081f559031fed7cde755e006b226cf06f33bd0f8 Mon Sep 17 00:00:00 2001 From: Ahmad Samir Date: Mon, 1 Feb 2021 01:03:40 +0200 Subject: General code cleanup Fix some clazy warnings, and some other minor code optimisations. NO_CHANGELOG --- src/core/kconfigwatcher.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/core/kconfigwatcher.cpp') diff --git a/src/core/kconfigwatcher.cpp b/src/core/kconfigwatcher.cpp index f63c39c1..c5aa6205 100644 --- a/src/core/kconfigwatcher.cpp +++ b/src/core/kconfigwatcher.cpp @@ -57,7 +57,8 @@ KConfigWatcher::KConfigWatcher(const KSharedConfig::Ptr &config): QStringList watchedPaths; watchedPaths << QLatin1Char('/') + d->m_config->name(); - for (const QString &file: d->m_config->additionalConfigSources()) { + const auto cfgSources = d->m_config->additionalConfigSources(); + for (const QString &file : cfgSources) { watchedPaths << QLatin1Char('/') + file; } if (d->m_config->openFlags() & KConfig::IncludeGlobals) { -- cgit v1.2.1