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

#include "skgundoredo_settings.h"

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

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

  return s_globalskgundoredo_settings()->q;
}

skgundoredo_settings::skgundoredo_settings( )
  : KConfigSkeleton()
{
  Q_ASSERT(!s_globalskgundoredo_settings()->q);
  s_globalskgundoredo_settings()->q = this;
  setCurrentGroup( QStringLiteral( "skg_undoredo" ) );

  KConfigSkeleton::ItemInt  *itemMaxNumberOfUndo;
  itemMaxNumberOfUndo = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "maxNumberOfUndo" ), mMaxNumberOfUndo, 50 );
  addItem( itemMaxNumberOfUndo, QStringLiteral( "maxNumberOfUndo" ) );
  KConfigSkeleton::ItemBool  *itemCleanHistoryOnSave;
  itemCleanHistoryOnSave = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "cleanHistoryOnSave" ), mCleanHistoryOnSave, false );
  addItem( itemCleanHistoryOnSave, QStringLiteral( "cleanHistoryOnSave" ) );
}

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

