aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Dudka <kdudka@redhat.com>2022-07-30 00:23:55 +0200
committerKamil Dudka <kdudka@redhat.com>2022-08-10 11:45:38 +0000
commited0ecf5b7640f0eca4aeba0e19cf173bc224585e (patch)
tree862f72d754516a3e7a4ac57bb158bb2e81ed9dcc
parentdbbff5540214d784eb285301c70a5c2732caedeb (diff)
downloadkconfig-ed0ecf5b7640f0eca4aeba0e19cf173bc224585e.tar.gz
kconfig-ed0ecf5b7640f0eca4aeba0e19cf173bc224585e.tar.bz2
KConfigWatcher: initialize d->m_config in constructor
... also when built without -DKCONFIG_USE_DBUS Fixes: https://bugs.kde.org/457285
-rw-r--r--src/core/kconfigwatcher.cpp4
1 files 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<QByteArrayList>();
qDBusRegisterMetaType<QHash<QString, QByteArrayList>>();
- d->m_config = config;
-
QStringList watchedPaths;
watchedPaths << QLatin1Char('/') + d->m_config->name();
const auto cfgSources = d->m_config->additionalConfigSources();