aboutsummaryrefslogtreecommitdiff
path: root/src/core/kconfigwatcher.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/kconfigwatcher.cpp')
-rw-r--r--src/core/kconfigwatcher.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/core/kconfigwatcher.cpp b/src/core/kconfigwatcher.cpp
index ae5d8849..0811db80 100644
--- a/src/core/kconfigwatcher.cpp
+++ b/src/core/kconfigwatcher.cpp
@@ -56,12 +56,13 @@ KConfigWatcher::KConfigWatcher(const KSharedConfig::Ptr &config)
qDBusRegisterMetaType<QByteArrayList>();
qDBusRegisterMetaType<QHash<QString, QByteArrayList>>();
- QStringList watchedPaths;
- watchedPaths << QLatin1Char('/') + d->m_config->name();
- const auto cfgSources = d->m_config->additionalConfigSources();
- for (const QString &file : cfgSources) {
- watchedPaths << QLatin1Char('/') + file;
+
+ QStringList watchedPaths = d->m_config->additionalConfigSources();
+ for (QString &file : watchedPaths) {
+ file.prepend(QLatin1Char('/'));
}
+ watchedPaths.prepend(QLatin1Char('/') + d->m_config->name());
+
if (d->m_config->openFlags() & KConfig::IncludeGlobals) {
watchedPaths << QStringLiteral("/kdeglobals");
}