From c8bf5e96cf2f25bb85330cf2587e2e365e6f0f71 Mon Sep 17 00:00:00 2001 From: Cyril Rossi Date: Fri, 24 Jan 2020 17:14:51 +0100 Subject: 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 --- src/core/kcoreconfigskeleton_p.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/core/kcoreconfigskeleton_p.h') 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 mIsDefaultImpl; -- cgit v1.2.1