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

#include "ewsmtasettings.h"

#include <klocalizedstring.h>

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

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

  return s_globalEwsMtaSettings()->q;
}

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

  mEwsResourceItem = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "EwsResource" ), mEwsResource );
  mEwsResourceItem->setLabel( i18n("Ews Resource") );
  mEwsResourceItem->setToolTip( i18n("The name of the parent EWS Resource to use when sending mail") );
  mEwsResourceItem->setWhatsThis( i18n("The name of the parent EWS Resource to use when sending mail") );
  addItem( mEwsResourceItem, QStringLiteral( "EwsResource" ) );
}

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

