// This file is generated by kconfig_compiler_kf6 from test_emptyentries.kcfg. // All changes you do to this file will be lost. #include "test_emptyentries.h" #include #include #include class QMakeBuilderSettingsHelper { public: QMakeBuilderSettingsHelper() : q(nullptr) {} ~QMakeBuilderSettingsHelper() { delete q; q = nullptr; } QMakeBuilderSettingsHelper(const QMakeBuilderSettingsHelper&) = delete; QMakeBuilderSettingsHelper& operator=(const QMakeBuilderSettingsHelper&) = delete; QMakeBuilderSettings *q; }; Q_GLOBAL_STATIC(QMakeBuilderSettingsHelper, s_globalQMakeBuilderSettings) QMakeBuilderSettings *QMakeBuilderSettings::self() { if (!s_globalQMakeBuilderSettings()->q) qFatal("you need to call QMakeBuilderSettings::instance before using"); return s_globalQMakeBuilderSettings()->q; } void QMakeBuilderSettings::instance(const QString& cfgfilename) { if (s_globalQMakeBuilderSettings()->q) { qDebug() << "QMakeBuilderSettings::instance called after the first use - ignoring"; return; } new QMakeBuilderSettings(KSharedConfig::openConfig(cfgfilename)); s_globalQMakeBuilderSettings()->q->read(); } void QMakeBuilderSettings::instance(KSharedConfig::Ptr config) { if (s_globalQMakeBuilderSettings()->q) { qDebug() << "QMakeBuilderSettings::instance called after the first use - ignoring"; return; } new QMakeBuilderSettings(std::move(config)); s_globalQMakeBuilderSettings()->q->read(); } QMakeBuilderSettings::QMakeBuilderSettings( KSharedConfig::Ptr config ) : KConfigSkeleton( std::move( config ) ) { Q_ASSERT(!s_globalQMakeBuilderSettings()->q); s_globalQMakeBuilderSettings()->q = this; } QMakeBuilderSettings::~QMakeBuilderSettings() { if (s_globalQMakeBuilderSettings.exists() && !s_globalQMakeBuilderSettings.isDestroyed()) { s_globalQMakeBuilderSettings()->q = nullptr; } }