aboutsummaryrefslogtreecommitdiff
path: root/autotests/kconfig_compiler/test_subgroups.cpp.ref
blob: 0c16742a1a477617d484c9654cf3a89781a693c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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()
{
}