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

#include "multisegkiosettings.h"

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

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

  return s_globalMultiSegKioSettings()->q;
}

MultiSegKioSettings::MultiSegKioSettings( )
  : KConfigSkeleton( QStringLiteral( "kget_multisegkiofactory.rc" ) )
{
  Q_ASSERT(!s_globalMultiSegKioSettings()->q);
  s_globalMultiSegKioSettings()->q = this;
  setCurrentGroup( QStringLiteral( "Segments" ) );

  KConfigSkeleton::ItemInt  *itemSegments;
  itemSegments = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "Segments" ), mSegments, 5 );
  addItem( itemSegments, QStringLiteral( "Segments" ) );
  KConfigSkeleton::ItemInt  *itemSaveSegSize;
  itemSaveSegSize = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "SaveSegSize" ), mSaveSegSize, 100 );
  addItem( itemSaveSegSize, QStringLiteral( "SaveSegSize" ) );

  setCurrentGroup( QStringLiteral( "SearchEngines" ) );

  KConfigSkeleton::ItemBool  *itemUseSearchEngines;
  itemUseSearchEngines = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "UseSearchEngines" ), mUseSearchEngines, false );
  addItem( itemUseSearchEngines, QStringLiteral( "UseSearchEngines" ) );

  setCurrentGroup( QStringLiteral( "Verification" ) );

  KConfigSkeleton::ItemBool  *itemUseSearchVerification;
  itemUseSearchVerification = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "UseSearchVerification" ), mUseSearchVerification, true );
  addItem( itemUseSearchVerification, QStringLiteral( "UseSearchVerification" ) );
}

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

