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

#include "ksirkskineditorsettings.h"

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

using namespace KsirkSkinEditor;

namespace KsirkSkinEditor {

class KsirkSkinEditorSettingsHelper
{
  public:
    KsirkSkinEditorSettingsHelper() : q(nullptr) {}
    ~KsirkSkinEditorSettingsHelper() { delete q; q = nullptr; }
    KsirkSkinEditorSettingsHelper(const KsirkSkinEditorSettingsHelper&) = delete;
    KsirkSkinEditorSettingsHelper& operator=(const KsirkSkinEditorSettingsHelper&) = delete;
    KsirkSkinEditorSettings *q;
};

}
Q_GLOBAL_STATIC(KsirkSkinEditorSettingsHelper, s_globalKsirkSkinEditorSettings)
KsirkSkinEditorSettings *KsirkSkinEditorSettings::self()
{
  if (!s_globalKsirkSkinEditorSettings()->q) {
    new KsirkSkinEditorSettings;
    s_globalKsirkSkinEditorSettings()->q->read();
  }

  return s_globalKsirkSkinEditorSettings()->q;
}

KsirkSkinEditorSettings::KsirkSkinEditorSettings( )
  : KConfigSkeleton( QStringLiteral( "ksirkskineditorrc" ) )
{
  Q_ASSERT(!s_globalKsirkSkinEditorSettings()->q);
  s_globalKsirkSkinEditorSettings()->q = this;
}

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

