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

#include "settings.h"

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

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

  return s_globalKAlgebraSettings()->q;
}

KAlgebraSettings::KAlgebraSettings( )
  : KConfigSkeleton( QStringLiteral( "cantorrc" ) )
{
  Q_ASSERT(!s_globalKAlgebraSettings()->q);
  s_globalKAlgebraSettings()->q = this;
  setCurrentGroup( QStringLiteral( "KAlgebraBackend" ) );

  KConfigSkeleton::ItemStringList  *itemAutorunScripts;
  itemAutorunScripts = new KConfigSkeleton::ItemStringList( currentGroup(), QStringLiteral( "autorunScripts" ), mAutorunScripts );
  addItem( itemAutorunScripts, QStringLiteral( "autorunScripts" ) );
}

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

