diff --git a/src/core/kconfigwatcher.h b/src/core/kconfigwatcher.h --- a/src/core/kconfigwatcher.h +++ b/src/core/kconfigwatcher.h @@ -51,6 +51,12 @@ ~KConfigWatcher() override; + /** + * Returns the config being watched + * @since 5.65 + */ + KSharedConfig::Ptr config() const; + Q_SIGNALS: /** * Emitted when a config group has changed diff --git a/src/core/kconfigwatcher.cpp b/src/core/kconfigwatcher.cpp --- a/src/core/kconfigwatcher.cpp +++ b/src/core/kconfigwatcher.cpp @@ -92,6 +92,11 @@ KConfigWatcher::~KConfigWatcher() = default; +KSharedConfig::Ptr KConfigWatcher::config() const +{ + return d->m_config; +} + void KConfigWatcher::onConfigChangeNotification(const QHash &changes) { //should we ever need it we can determine the file changed with QDbusContext::message().path(), but it doesn't seem too useful