// This file is generated by kconfig_compiler_kf6 from cmakebuilderconfig.kcfg.
// All changes you do to this file will be lost.

#include "cmakebuilderconfig.h"

#include <qglobal.h>
#include <QFile>

class CMakeBuilderSettingsHelper
{
  public:
    CMakeBuilderSettingsHelper() noexcept : q(nullptr) {}
    ~CMakeBuilderSettingsHelper() noexcept { delete q; q = nullptr; }
    CMakeBuilderSettingsHelper(const CMakeBuilderSettingsHelper&) = delete;
    CMakeBuilderSettingsHelper& operator=(const CMakeBuilderSettingsHelper&) = delete;
    CMakeBuilderSettings *q;
};
Q_GLOBAL_STATIC(CMakeBuilderSettingsHelper, s_globalCMakeBuilderSettings)
CMakeBuilderSettings *CMakeBuilderSettings::self()
{
  if (!s_globalCMakeBuilderSettings()->q) {
    new CMakeBuilderSettings;
    s_globalCMakeBuilderSettings()->q->read();
  }

  return s_globalCMakeBuilderSettings()->q;
}

CMakeBuilderSettings::CMakeBuilderSettings( )
  : KConfigSkeleton( QStringLiteral( "kdeveloprc" ) )
{
  Q_ASSERT(!s_globalCMakeBuilderSettings()->q);
  s_globalCMakeBuilderSettings()->q = this;
  setCurrentGroup( QStringLiteral( "CMakeBuilder" ) );

  mCmakeExecutableItem = new KConfigSkeleton::ItemUrl( currentGroup(), QStringLiteral( "cmakeExe" ), mCmakeExecutable, QUrl::fromLocalFile(CMake::findExecutable()) );
  mCmakeExecutableItem->setLabel( QCoreApplication::translate("CMakeBuilderSettings", "cmakeExe") );
  mCmakeExecutableItem->setWhatsThis( QCoreApplication::translate("CMakeBuilderSettings", "The path to the default CMake executable.") );
  addItem( mCmakeExecutableItem, QStringLiteral( "cmakeExecutable" ) );
  mGeneratorItem = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "generator" ), mGenerator, 0 );
  mGeneratorItem->setLabel( QCoreApplication::translate("CMakeBuilderSettings", "generator") );
  addItem( mGeneratorItem, QStringLiteral( "generator" ) );
}

CMakeBuilderSettings::~CMakeBuilderSettings()
{
  if (s_globalCMakeBuilderSettings.exists() && !s_globalCMakeBuilderSettings.isDestroyed()) {
    s_globalCMakeBuilderSettings()->q = nullptr;
  }
}

