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

#include "settings.h"

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

class SettingsHelper
{
  public:
    SettingsHelper() : q(nullptr) {}
    ~SettingsHelper() { delete q; q = nullptr; }
    SettingsHelper(const SettingsHelper&) = delete;
    SettingsHelper& operator=(const SettingsHelper&) = delete;
    Settings *q;
};
Q_GLOBAL_STATIC(SettingsHelper, s_globalSettings)
Settings *Settings::self()
{
  if (!s_globalSettings()->q) {
    new Settings;
    s_globalSettings()->q->read();
  }

  return s_globalSettings()->q;
}

Settings::Settings( )
  : KConfigSkeleton()
{
  Q_ASSERT(!s_globalSettings()->q);
  s_globalSettings()->q = this;
  setCurrentGroup( QStringLiteral( "General" ) );

  KConfigSkeleton::ItemBool  *itemEnabled;
  itemEnabled = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "enabled" ), mEnabled, false );
  addItem( itemEnabled, QStringLiteral( "enabled" ) );
  KConfigSkeleton::ItemBool  *itemCreateDefaultBoxes;
  itemCreateDefaultBoxes = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "createDefaultBoxes" ), mCreateDefaultBoxes, true );
  addItem( itemCreateDefaultBoxes, QStringLiteral( "createDefaultBoxes" ) );
  KConfigSkeleton::ItemBool  *itemFixedSpecialCollections;
  itemFixedSpecialCollections = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "fixedSpecialCollections" ), mFixedSpecialCollections, false );
  addItem( itemFixedSpecialCollections, QStringLiteral( "fixedSpecialCollections" ) );
}

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

