From ed0ecf5b7640f0eca4aeba0e19cf173bc224585e Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Sat, 30 Jul 2022 00:23:55 +0200 Subject: KConfigWatcher: initialize d->m_config in constructor ... also when built without -DKCONFIG_USE_DBUS Fixes: https://bugs.kde.org/457285 --- src/core/kconfigwatcher.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/kconfigwatcher.cpp b/src/core/kconfigwatcher.cpp index ec3cb541..ae5d8849 100644 --- a/src/core/kconfigwatcher.cpp +++ b/src/core/kconfigwatcher.cpp @@ -49,13 +49,13 @@ KConfigWatcher::KConfigWatcher(const KSharedConfig::Ptr &config) , d(new KConfigWatcherPrivate) { Q_ASSERT(config); + d->m_config = config; + #if KCONFIG_USE_DBUS qDBusRegisterMetaType(); qDBusRegisterMetaType>(); - d->m_config = config; - QStringList watchedPaths; watchedPaths << QLatin1Char('/') + d->m_config->name(); const auto cfgSources = d->m_config->additionalConfigSources(); -- cgit v1.2.1