Warning, /frameworks/kconfig/autotests/kconfig_compiler/test1.cpp.ref is written in an unsupported language. File is not indexed.
0001 // This file is generated by kconfig_compiler_kf5 from test1.kcfg. 0002 // All changes you do to this file will be lost. 0003 0004 #include "test1.h" 0005 0006 Test1::Test1( const QString & transport, const QString & folder, QObject *parent ) 0007 : KConfigSkeleton( QStringLiteral( "examplerc" ) ) 0008 , mParamtransport(transport) 0009 , mParamfolder(folder) 0010 { 0011 setParent(parent); 0012 setCurrentGroup( QStringLiteral( "General-%1" ).arg( mParamfolder ) ); 0013 0014 KConfigSkeleton::ItemBool *itemOneOption; 0015 itemOneOption = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "OneOption" ), mOneOption, true ); 0016 addItem( itemOneOption, QStringLiteral( "OneOption" ) ); 0017 KConfigSkeleton::ItemInt *itemAnotherOption; 0018 itemAnotherOption = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "Another Option" ), mAnotherOption, 5 ); 0019 addItem( itemAnotherOption, QStringLiteral( "AnotherOption" ) ); 0020 QList<KConfigSkeleton::ItemEnum::Choice> valuesListOption; 0021 { 0022 KConfigSkeleton::ItemEnum::Choice choice; 0023 choice.name = QStringLiteral("One"); 0024 valuesListOption.append( choice ); 0025 } 0026 { 0027 KConfigSkeleton::ItemEnum::Choice choice; 0028 choice.name = QStringLiteral("Two"); 0029 valuesListOption.append( choice ); 0030 } 0031 { 0032 KConfigSkeleton::ItemEnum::Choice choice; 0033 choice.name = QStringLiteral("Three"); 0034 valuesListOption.append( choice ); 0035 } 0036 KConfigSkeleton::ItemEnum *itemListOption; 0037 itemListOption = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "ListOption" ), mListOption, valuesListOption, EnumListOption::One ); 0038 addItem( itemListOption, QStringLiteral( "ListOption" ) ); 0039 0040 setCurrentGroup( QStringLiteral( "MyOptions" ) ); 0041 0042 KConfigSkeleton::ItemString *itemMyString; 0043 itemMyString = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "MyString" ), mMyString, QStringLiteral( "Default String" ) ); 0044 addItem( itemMyString, QStringLiteral( "MyString" ) ); 0045 KConfigSkeleton::ItemPath *itemMyPath; 0046 itemMyPath = new KConfigSkeleton::ItemPath( currentGroup(), QStringLiteral( "MyPath" ), mMyPath, QDir::homePath()+QString::fromLatin1(".hidden_file") ); 0047 addItem( itemMyPath, QStringLiteral( "MyPath" ) ); 0048 KConfigSkeleton::ItemInt *itemAnotherOption2; 0049 itemAnotherOption2 = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "Another Option" ), mAnotherOption2, 10 ); 0050 addItem( itemAnotherOption2, QStringLiteral( "AnotherOption2" ) ); 0051 QStringList defaultMyStringList; 0052 defaultMyStringList.append( QString::fromUtf8( "up" ) ); 0053 defaultMyStringList.append( QString::fromUtf8( "down" ) ); 0054 0055 KConfigSkeleton::ItemStringList *itemMyStringList; 0056 itemMyStringList = new KConfigSkeleton::ItemStringList( currentGroup(), QStringLiteral( "MyStringList" ), mMyStringList, defaultMyStringList ); 0057 addItem( itemMyStringList, QStringLiteral( "MyStringList" ) ); 0058 QStringList defaultMyStringListHidden; 0059 defaultMyStringListHidden.append( QString::fromUtf8( "up" ) ); 0060 defaultMyStringListHidden.append( QString::fromUtf8( "down" ) ); 0061 0062 KConfigSkeleton::ItemStringList *itemMyStringListHidden; 0063 itemMyStringListHidden = new KConfigSkeleton::ItemStringList( currentGroup(), QStringLiteral( "MyStringListHidden" ), mMyStringListHidden, defaultMyStringListHidden ); 0064 addItem( itemMyStringListHidden, QStringLiteral( "MyStringListHidden" ) ); 0065 KConfigSkeleton::ItemInt *itemMyNumber; 0066 itemMyNumber = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "List-%1-%2" ).arg( mParamtransport, mParamfolder ), mMyNumber, 1 ); 0067 addItem( itemMyNumber, QStringLiteral( "MyNumber" ) ); 0068 } 0069 0070 Test1::~Test1() 0071 { 0072 } 0073