Changeset View
Changeset View
Standalone View
Standalone View
autotests/kconfig_compiler/test8c.cpp.ref
1 | // This file is generated by kconfig_compiler_kf5 from test8c.kcfg. | 1 | // This file is generated by kconfig_compiler_kf5 from test8c.kcfg. | ||
---|---|---|---|---|---|
2 | // All changes you do to this file will be lost. | 2 | // All changes you do to this file will be lost. | ||
3 | 3 | | |||
4 | #include "test8c.h" | 4 | #include "test8c.h" | ||
5 | 5 | | |||
6 | #include <qglobal.h> | 6 | #include <qglobal.h> | ||
7 | #include <QFile> | 7 | #include <QFile> | ||
8 | 8 | | |||
9 | #include <QDebug> | 9 | #include <QDebug> | ||
10 | 10 | | |||
11 | class Test8cHelper | 11 | class Test8cHelper | ||
12 | { | 12 | { | ||
13 | public: | 13 | public: | ||
14 | Test8cHelper() : q(nullptr) {} | 14 | Test8cHelper() : q(nullptr) {} | ||
15 | ~Test8cHelper() { delete q; } | 15 | ~Test8cHelper() { delete q; } | ||
16 | Test8cHelper(const Test8cHelper&) = delete; | ||||
17 | Test8cHelper& operator=(const Test8cHelper&) = delete; | ||||
16 | Test8c *q; | 18 | Test8c *q; | ||
17 | }; | 19 | }; | ||
18 | Q_GLOBAL_STATIC(Test8cHelper, s_globalTest8c) | 20 | Q_GLOBAL_STATIC(Test8cHelper, s_globalTest8c) | ||
19 | Test8c *Test8c::self() | 21 | Test8c *Test8c::self() | ||
20 | { | 22 | { | ||
21 | if (!s_globalTest8c()->q) | 23 | if (!s_globalTest8c()->q) | ||
22 | qFatal("you need to call Test8c::instance before using"); | 24 | qFatal("you need to call Test8c::instance before using"); | ||
23 | return s_globalTest8c()->q; | 25 | return s_globalTest8c()->q; | ||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |