aboutsummaryrefslogtreecommitdiff
path: root/autotests/kconfig_compiler/test_subgroups.cpp.ref
diff options
context:
space:
mode:
authorCyril Rossi <cyril.rossi@enioka.com>2020-02-03 13:50:17 +0100
committerCyril Rossi <cyril.rossi@enioka.com>2020-04-22 09:13:09 +0200
commit00213a3a0906f0e1b5fa97a9e8de235a1e3cdcbf (patch)
tree5638cbcaea1c46cf079f7232b1248c00b445d804 /autotests/kconfig_compiler/test_subgroups.cpp.ref
parentfb29718d3ac64bdc9e1f2a3d15a506f7798e4a76 (diff)
downloadkconfig-00213a3a0906f0e1b5fa97a9e8de235a1e3cdcbf.tar.gz
kconfig-00213a3a0906f0e1b5fa97a9e8de235a1e3cdcbf.tar.bz2
kconfig_compiler : generate kconfig settings with subgroup
Summary: Following D27059, add `parentGroupName` attribute to `group` element to generate kconfig settings with subgroups Reviewers: ervin, dfaure, #frameworks, meven Reviewed By: ervin, meven Subscribers: apol, meven, kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D27133
Diffstat (limited to 'autotests/kconfig_compiler/test_subgroups.cpp.ref')
-rw-r--r--autotests/kconfig_compiler/test_subgroups.cpp.ref47
1 files changed, 47 insertions, 0 deletions
diff --git a/autotests/kconfig_compiler/test_subgroups.cpp.ref b/autotests/kconfig_compiler/test_subgroups.cpp.ref
new file mode 100644
index 00000000..0c16742a
--- /dev/null
+++ b/autotests/kconfig_compiler/test_subgroups.cpp.ref
@@ -0,0 +1,47 @@
+// This file is generated by kconfig_compiler_kf5 from test_subgroups.kcfg.
+// All changes you do to this file will be lost.
+
+#include "test_subgroups.h"
+
+TestSubgroups::TestSubgroups( const QString & GeneralGroup, const QString & SubGroup, const QString & AnotherSubGroup )
+ : KConfigSkeleton( QStringLiteral( "kconfig_compiler_kf5_test_rc" ) )
+ , mParamGeneralGroup(GeneralGroup)
+ , mParamSubGroup(SubGroup)
+ , mParamAnotherSubGroup(AnotherSubGroup)
+{
+ KConfigGroup cgGeneralGroup(this->config(), QStringLiteral( "%1" ).arg( mParamGeneralGroup ));
+ KConfigGroup cgSubGroup = cgGeneralGroup.group(QStringLiteral( "%1" ).arg( mParamSubGroup ));
+ KConfigSkeleton::ItemBool *itemFoo;
+ itemFoo = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "Foo" ), mFoo, true );
+ itemFoo->setWriteFlags(KConfigBase::Notify);
+ itemFoo->setGroup(cgSubGroup);
+ addItem( itemFoo, QStringLiteral( "Foo" ) );
+
+ KConfigGroup cgother = cgGeneralGroup.group(QStringLiteral( "other" ));
+ KConfigSkeleton::ItemInt *itemBar;
+ itemBar = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "Bar" ), mBar, 42 );
+ itemBar->setWriteFlags(KConfigBase::Notify);
+ itemBar->setGroup(cgother);
+ addItem( itemBar, QStringLiteral( "Bar" ) );
+
+ KConfigGroup cgParentGroup(this->config(), QStringLiteral( "ParentGroup" ));
+ KConfigGroup cgAnotherSubGroup = cgParentGroup.group(QStringLiteral( "%1" ).arg( mParamAnotherSubGroup ));
+ KConfigSkeleton::ItemBool *itemBaz;
+ itemBaz = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "Baz" ), mBaz, true );
+ itemBaz->setWriteFlags(KConfigBase::Notify);
+ itemBaz->setGroup(cgAnotherSubGroup);
+ addItem( itemBaz, QStringLiteral( "Baz" ) );
+
+ KConfigGroup cgSimpleParentGroup(this->config(), QStringLiteral( "SimpleParentGroup" ));
+ KConfigGroup cgSimpleGroup = cgSimpleParentGroup.group(QStringLiteral( "SimpleGroup" ));
+ KConfigSkeleton::ItemBool *itemFoobar;
+ itemFoobar = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "Foobar" ), mFoobar, true );
+ itemFoobar->setWriteFlags(KConfigBase::Notify);
+ itemFoobar->setGroup(cgSimpleGroup);
+ addItem( itemFoobar, QStringLiteral( "Foobar" ) );
+}
+
+TestSubgroups::~TestSubgroups()
+{
+}
+