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

#include "sendlateragentsettings.h"

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

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

  return s_globalSendLaterAgentSettings()->q;
}

SendLaterAgentSettings::SendLaterAgentSettings( )
  : KConfigSkeleton( QStringLiteral( "akonadi_sendlater_agentrc" ) )
{
  Q_ASSERT(!s_globalSendLaterAgentSettings()->q);
  s_globalSendLaterAgentSettings()->q = this;
  setCurrentGroup( QStringLiteral( "General" ) );

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

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

