Warning, /frameworks/kconfig/autotests/kconfig_compiler/test10.cpp.ref is written in an unsupported language. File is not indexed.

0001 // This file is generated by kconfig_compiler_kf6 from test10.kcfg.
0002 // All changes you do to this file will be lost.
0003 
0004 #include "test10.h"
0005 
0006 #include <qglobal.h>
0007 #include <QFile>
0008 
0009 class Test10Helper
0010 {
0011   public:
0012     Test10Helper() : q(nullptr) {}
0013     ~Test10Helper() { delete q; q = nullptr; }
0014     Test10Helper(const Test10Helper&) = delete;
0015     Test10Helper& operator=(const Test10Helper&) = delete;
0016     Test10 *q;
0017 };
0018 Q_GLOBAL_STATIC(Test10Helper, s_globalTest10)
0019 Test10 *Test10::self()
0020 {
0021   if (!s_globalTest10()->q) {
0022     new Test10;
0023     s_globalTest10()->q->read();
0024   }
0025 
0026   return s_globalTest10()->q;
0027 }
0028 
0029 Test10::Test10( )
0030   : KConfigSkeleton( QStringLiteral( "test10rc" ) )
0031 {
0032   Q_ASSERT(!s_globalTest10()->q);
0033   s_globalTest10()->q = this;
0034   setCurrentGroup( QStringLiteral( "Foo" ) );
0035 
0036   KConfigSkeleton::ItemUrl  *itemFooBar;
0037   itemFooBar = new KConfigSkeleton::ItemUrl( currentGroup(), QStringLiteral( "foo bar" ), mFooBar );
0038   addItem( itemFooBar, QStringLiteral( "FooBar" ) );
0039   KConfigSkeleton::ItemUrlList  *itemBarFoo;
0040   itemBarFoo = new KConfigSkeleton::ItemUrlList( currentGroup(), QStringLiteral( "bar foo" ), mBarFoo );
0041   addItem( itemBarFoo, QStringLiteral( "BarFoo" ) );
0042 }
0043 
0044 Test10::~Test10()
0045 {
0046   if (s_globalTest10.exists() && !s_globalTest10.isDestroyed()) {
0047     s_globalTest10()->q = nullptr;
0048   }
0049 }
0050