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

#include "scanfolderpluginsettings.h"

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

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

  return s_globalScanFolderPluginSettings()->q;
}

ScanFolderPluginSettings::ScanFolderPluginSettings( )
  : KConfigSkeleton( QStringLiteral( "ktscanfolderpluginrc" ) )
{
  Q_ASSERT(!s_globalScanFolderPluginSettings()->q);
  s_globalScanFolderPluginSettings()->q = this;
  setCurrentGroup( QStringLiteral( "general" ) );

  KConfigSkeleton::ItemStringList  *itemFolders;
  itemFolders = new KConfigSkeleton::ItemStringList( currentGroup(), QStringLiteral( "folders" ), mFolders );
  addItem( itemFolders, QStringLiteral( "folders" ) );
  KConfigSkeleton::ItemBool  *itemOpenSilently;
  itemOpenSilently = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "openSilently" ), mOpenSilently, false );
  addItem( itemOpenSilently, QStringLiteral( "openSilently" ) );
  KConfigSkeleton::ItemBool  *itemActionDelete;
  itemActionDelete = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "actionDelete" ), mActionDelete, false );
  addItem( itemActionDelete, QStringLiteral( "actionDelete" ) );
  KConfigSkeleton::ItemBool  *itemActionMove;
  itemActionMove = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "actionMove" ), mActionMove, false );
  addItem( itemActionMove, QStringLiteral( "actionMove" ) );
  KConfigSkeleton::ItemBool  *itemRecursive;
  itemRecursive = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "recursive" ), mRecursive, false );
  addItem( itemRecursive, QStringLiteral( "recursive" ) );
  KConfigSkeleton::ItemBool  *itemAddToGroup;
  itemAddToGroup = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "addToGroup" ), mAddToGroup, false );
  addItem( itemAddToGroup, QStringLiteral( "addToGroup" ) );
  KConfigSkeleton::ItemString  *itemGroup;
  itemGroup = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "group" ), mGroup );
  addItem( itemGroup, QStringLiteral( "group" ) );
}

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

