diff options
author | David Edmundson <kde@davidedmundson.co.uk> | 2018-10-10 14:48:49 +0100 |
---|---|---|
committer | David Edmundson <kde@davidedmundson.co.uk> | 2018-10-10 14:51:04 +0100 |
commit | 8579ec54838b7188ed016f7adb4a69bbf2e39712 (patch) | |
tree | b9614b014ba779dae40e96069fc2cadeeecea9de /src/core/kconfigbase.h | |
parent | 8e56083463374fa6525b5feff4373b5ab58914bb (diff) | |
download | kconfig-8579ec54838b7188ed016f7adb4a69bbf2e39712.tar.gz kconfig-8579ec54838b7188ed016f7adb4a69bbf2e39712.tar.bz2 |
Add mechanism to notify other clients of config changes over DBus
Summary:
Intention is not to create a registry like system, but to replace
KDElibs4Support::KGlobalSettings and to replace other system settingss
-> some app communication in a more generic way.
writeEntry gains an additional flag Notify which if set, will notify
clients of what has actually changed when we sync.
Rationale to put this into KConfig was so that we could have everything
batched and sychronised to the file sync and to get the fine detailed
exposure of what has actually changed which we don't get with a file
watcher.
Default behaviour remains identical without any broadcast messages.
As it is a new dependency it is purely optional and anything referencing
DBus is not in the public API. Our deployment on platforms without DBus
tend to be standalone applications anyway.
Test Plan: Attached unit test
Reviewers: broulik, dfaure
Reviewed By: broulik, dfaure
Subscribers: dfaure, broulik, zzag, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D13034
Diffstat (limited to 'src/core/kconfigbase.h')
-rw-r--r-- | src/core/kconfigbase.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/core/kconfigbase.h b/src/core/kconfigbase.h index b7403de1..62a0cc31 100644 --- a/src/core/kconfigbase.h +++ b/src/core/kconfigbase.h @@ -58,13 +58,19 @@ public: */ Localized = 0x04, /**< + * Notify remote KConfigWatchers of changes (requires DBus support) + * Implied persistent + * @since 5.51 + */ + Notify = 0x08 | Persistent, + /**< * Add the locale tag to the key when writing it. */ Normal = Persistent - /**< - * Save the entry to the application specific config file without - * a locale tag. This is the default. - */ + /**< + * Save the entry to the application specific config file without + * a locale tag. This is the default. + */ }; Q_DECLARE_FLAGS(WriteConfigFlags, WriteConfigFlag) |