From 7ab8275bdb56882692846d046a5bbeca5795b009 Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Tue, 10 Dec 2019 11:15:11 +0000 Subject: Expose getter to KConfigWatcher's config Summary: It can help save users having to member variables for the config and the watcher. Reviewers: broulik Reviewed By: broulik Subscribers: broulik, kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D25833 --- src/core/kconfigwatcher.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/core/kconfigwatcher.cpp') diff --git a/src/core/kconfigwatcher.cpp b/src/core/kconfigwatcher.cpp index 4d4d1355..c4a877c5 100644 --- a/src/core/kconfigwatcher.cpp +++ b/src/core/kconfigwatcher.cpp @@ -92,6 +92,11 @@ KConfigWatcher::KConfigWatcher(const KSharedConfig::Ptr &config): 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 -- cgit v1.2.1