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

#include "notesagentsettings.h"

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

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

  return s_globalNotesAgentSettings()->q;
}

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

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

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

