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/CMakeLists.txt | |
| 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/CMakeLists.txt')
| -rw-r--r-- | src/core/CMakeLists.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index f06c803f..28aad4f8 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -10,8 +10,11 @@ set(libkconfigcore_SRCS kcoreconfigskeleton.cpp kauthorized.cpp kemailsettings.cpp + kconfigwatcher.cpp ) +configure_file(config-kconfig.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kconfig.h ) + add_library(KF5ConfigCore ${libkconfigcore_SRCS}) generate_export_header(KF5ConfigCore BASE_NAME KConfigCore) add_library(KF5::ConfigCore ALIAS KF5ConfigCore) @@ -24,6 +27,11 @@ target_compile_definitions(KF5ConfigCore target_include_directories(KF5ConfigCore INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF5}/KConfigCore>") target_link_libraries(KF5ConfigCore PUBLIC Qt5::Core) + +if(KCONFIG_USE_DBUS) + target_link_libraries(KF5ConfigCore PRIVATE Qt5::DBus) +endif() + if(WIN32) target_link_libraries(KF5ConfigCore PRIVATE ${KDEWIN_LIBRARIES}) endif() @@ -44,6 +52,7 @@ ecm_generate_headers(KConfigCore_HEADERS KCoreConfigSkeleton KEMailSettings ConversionCheck + KConfigWatcher REQUIRED_HEADERS KConfigCore_HEADERS ) @@ -68,6 +77,7 @@ if (PythonModuleGeneration_FOUND) kcoreconfigskeleton.h kemailsettings.h conversioncheck.h + kconfigwatcher.h ) endif() |
