diff options
| author | Kevin Ottens <kevin.ottens@enioka.com> | 2019-10-10 13:25:44 +0200 |
|---|---|---|
| committer | Kevin Ottens <kevin.ottens@enioka.com> | 2019-10-10 13:26:21 +0200 |
| commit | 4c3d3751968422ff5cba56b5da2036a1bceba314 (patch) | |
| tree | 50ab07c230acd982a94eee7e8c750c2900946578 /src/core/kcoreconfigskeleton_p.h | |
| parent | 5fa1a3312ab24908d870ce2a2399695ac98d828d (diff) | |
| download | kconfig-4c3d3751968422ff5cba56b5da2036a1bceba314.tar.gz kconfig-4c3d3751968422ff5cba56b5da2036a1bceba314.tar.bz2 | |
Add convenience for defaults/dirty states to KCoreConfigSkeleton
Summary:
It allows to verify if all the items of the skeleton are in their
default values or if they hold any value deviating from the latest
loaded values from KConfig.
We didn't really need this during the KCModule/QtWidgets time since we
could write KConfigDialogManager just fine without it. But for use with
QML and aiming at having similar magic in KQuickAddons::ConfigModule
such convenience functions will be needed.
Reviewers: #plasma, #frameworks, dfaure, mart
Subscribers: apol, kossebau, davidedmundson, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D24494
Diffstat (limited to 'src/core/kcoreconfigskeleton_p.h')
| -rw-r--r-- | src/core/kcoreconfigskeleton_p.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/kcoreconfigskeleton_p.h b/src/core/kcoreconfigskeleton_p.h index 41005c6f..623bfa03 100644 --- a/src/core/kcoreconfigskeleton_p.h +++ b/src/core/kcoreconfigskeleton_p.h @@ -60,6 +60,10 @@ public: QString mLabel; ///< The label for this item QString mToolTip; ///< The ToolTip text for this item QString mWhatsThis; ///< The What's This text for this item + + // HACK: Necessary to avoid introducing new virtuals in KConfigSkeletonItem + std::function<bool()> mIsDefaultImpl; + std::function<bool()> mIsSaveNeededImpl; }; #endif |
