// This file is generated by kconfig_compiler_kf5 from ktp-proxy-config.kcfg.
// All changes you do to this file will be lost.

#include "ktp-proxy-config.h"

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

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

  return s_globalKTpProxyConfig()->q;
}

KTpProxyConfig::KTpProxyConfig( )
  : KConfigSkeleton( QStringLiteral( "ktp-proxy-config" ) )
{
  Q_ASSERT(!s_globalKTpProxyConfig()->q);
  s_globalKTpProxyConfig()->q = this;
  setCurrentGroup( QStringLiteral( "Policy" ) );

  QList<KConfigSkeleton::ItemEnum::Choice> valuesOTRPolicy;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Always");
    valuesOTRPolicy.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Opportunistic");
    valuesOTRPolicy.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Manual");
    valuesOTRPolicy.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Never");
    valuesOTRPolicy.append( choice );
  }
  mOTRPolicyItem = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "OTRPolicy" ), mOTRPolicy, valuesOTRPolicy, Manual );
  addItem( mOTRPolicyItem, QStringLiteral( "OTRPolicy" ) );
}

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

