// This file is generated by kconfig_compiler_kf6 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;
  KConfigCompilerSignallingItem::NotifyFunction notifyFunction = static_cast<KConfigCompilerSignallingItem::NotifyFunction>(&Settings::itemChanged);

  setCurrentGroup( QStringLiteral( "DrKonqi" ) );

  KConfigCompilerSignallingItem  *itemSentry;
  KConfigSkeleton::ItemBool  *innerItemSentry;
  innerItemSentry = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "Sentry" ), mSentry, false );
  itemSentry = new KConfigCompilerSignallingItem(innerItemSentry, this, notifyFunction, signalSentryChanged);
  addItem( itemSentry, QStringLiteral( "Sentry" ) );
  KConfigCompilerSignallingItem  *itemDownloadSymbols;
  KConfigSkeleton::ItemBool  *innerItemDownloadSymbols;
  innerItemDownloadSymbols = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "DownloadSymbols" ), mDownloadSymbols, false );
  itemDownloadSymbols = new KConfigCompilerSignallingItem(innerItemDownloadSymbols, this, notifyFunction, signalDownloadSymbolsChanged);
  addItem( itemDownloadSymbols, QStringLiteral( "DownloadSymbols" ) );
}

bool Settings::defaultSentryValue_helper()
{

  return false;
}

bool Settings::defaultDownloadSymbolsValue_helper()
{

  return false;
}

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


void Settings::itemChanged(quint64 signalFlag) {

  switch (signalFlag) {
  case signalSentryChanged:
    Q_EMIT SentryChanged();
    break;
  case signalDownloadSymbolsChanged:
    Q_EMIT DownloadSymbolsChanged();
    break;
  }
}
