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

#include "clangtidyconfig.h"

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

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

  return s_globalClangTidySettings()->q;
}

ClangTidySettings::ClangTidySettings( )
  : KConfigSkeleton()
{
  Q_ASSERT(!s_globalClangTidySettings()->q);
  s_globalClangTidySettings()->q = this;
  setCurrentGroup( QStringLiteral( "ClangTidy" ) );

  mClangtidyPathItem = new KConfigSkeleton::ItemPath( currentGroup(), QStringLiteral( "ExecutablePath" ), mClangtidyPath, KDevelop::Utils::findExecutable(QStringLiteral("clang-tidy")) );
  addItem( mClangtidyPathItem, QStringLiteral( "clangtidyPath" ) );
  mParallelJobsEnabledItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "parallelJobsEnabled" ), mParallelJobsEnabled, true );
  addItem( mParallelJobsEnabledItem, QStringLiteral( "parallelJobsEnabled" ) );
  mParallelJobsAutoCountItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "parallelJobsAutoCount" ), mParallelJobsAutoCount, true );
  addItem( mParallelJobsAutoCountItem, QStringLiteral( "parallelJobsAutoCount" ) );
  mParallelJobsFixedCountItem = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "parallelJobsFixedCount" ), mParallelJobsFixedCount, 2 );
  addItem( mParallelJobsFixedCountItem, QStringLiteral( "parallelJobsFixedCount" ) );
}

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

