diff options
| author | Cyril Rossi <cyril.rossi@enioka.com> | 2020-01-24 17:14:51 +0100 |
|---|---|---|
| committer | Cyril Rossi <cyril.rossi@enioka.com> | 2020-02-24 13:23:24 +0100 |
| commit | c8bf5e96cf2f25bb85330cf2587e2e365e6f0f71 (patch) | |
| tree | 7a9866f61e7b7caf4f67f555f80d5ce852cdb775 /src/core/kcoreconfigskeleton_p.h | |
| parent | 55aaa712b75b1401331e29aef08123556b0257f3 (diff) | |
| download | kconfig-c8bf5e96cf2f25bb85330cf2587e2e365e6f0f71.tar.gz kconfig-c8bf5e96cf2f25bb85330cf2587e2e365e6f0f71.tar.bz2 | |
KConfigSkeletonItem : allow to set a KconfigGroup to read and write items in nested groups
Summary:
Currently KConfgiSkeleton cannot manage item entry in subgroup, like
```
[General][Colors]
MyItem=foo
```
Example of use
```
// Generated Class with KConfig compiler, inherits KConfigSkeleton
KConfigGroup generalGroup( &config, "General" );
KConfigGroup colorsGroup = config.group( "Colors" )
myItem->setGroup(cg); // Now can take a KConfigGroup
addItem(myItem, "MyItem");
```
Evolution of kconfig compiler will follow to consider this.
Reviewers: ervin, dfaure, #frameworks, mdawson
Reviewed By: ervin, dfaure
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D27059
Diffstat (limited to 'src/core/kcoreconfigskeleton_p.h')
| -rw-r--r-- | src/core/kcoreconfigskeleton_p.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/kcoreconfigskeleton_p.h b/src/core/kcoreconfigskeleton_p.h index 871122c0..8ba64db7 100644 --- a/src/core/kcoreconfigskeleton_p.h +++ b/src/core/kcoreconfigskeleton_p.h @@ -61,6 +61,7 @@ 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 + KConfigGroup mConfigGroup; ///< KConfigGroup, allow to read/write item in nested groups // HACK: Necessary to avoid introducing new virtuals in KConfigSkeletonItem std::function<bool()> mIsDefaultImpl; |
