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

#include "archivemailagentsettings.h"

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

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

  return s_globalArchiveMailAgentSettings()->q;
}

ArchiveMailAgentSettings::ArchiveMailAgentSettings( )
  : KConfigSkeleton()
{
  Q_ASSERT(!s_globalArchiveMailAgentSettings()->q);
  s_globalArchiveMailAgentSettings()->q = this;
  setCurrentGroup( QStringLiteral( "General" ) );

  KConfigSkeleton::ItemBool  *itemEnabled;
  itemEnabled = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "enabled" ), mEnabled, true );
  addItem( itemEnabled, QStringLiteral( "enabled" ) );
}

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

