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

#include "kopete_otr.h"

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

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

  return s_globalKopeteOtrKcfg()->q;
}

KopeteOtrKcfg::KopeteOtrKcfg( )
  : KConfigSkeleton( QStringLiteral( "kopete_otr" ) )
{
  Q_ASSERT(!s_globalKopeteOtrKcfg()->q);
  s_globalKopeteOtrKcfg()->q = this;
  setCurrentGroup( QStringLiteral( "Policy" ) );

  mRbAlwaysItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "rbAlways" ), mRbAlways, false );
  addItem( mRbAlwaysItem, QStringLiteral( "rbAlways" ) );
  mRbOpportunisticItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "rbOpportunistic" ), mRbOpportunistic, true );
  addItem( mRbOpportunisticItem, QStringLiteral( "rbOpportunistic" ) );
  mRbManualItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "rbManual" ), mRbManual, false );
  addItem( mRbManualItem, QStringLiteral( "rbManual" ) );
  mRbNeverItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "rbNever" ), mRbNever, false );
  addItem( mRbNeverItem, QStringLiteral( "rbNever" ) );
}

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

