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

#include "bit_ly_settings.h"

#include <kglobal.h>
#include <QtCore/QFile>

class Bit_ly_SettingsHelper
{
  public:
    Bit_ly_SettingsHelper() : q(0) {}
    ~Bit_ly_SettingsHelper() { delete q; }
    Bit_ly_Settings *q;
};
K_GLOBAL_STATIC(Bit_ly_SettingsHelper, s_globalBit_ly_Settings)
Bit_ly_Settings *Bit_ly_Settings::self()
{
  if (!s_globalBit_ly_Settings->q) {
    new Bit_ly_Settings;
    s_globalBit_ly_Settings->q->readConfig();
  }

  return s_globalBit_ly_Settings->q;
}

Bit_ly_Settings::Bit_ly_Settings(  )
  : KConfigSkeleton( QLatin1String( "choqokrc" ) )
{
  Q_ASSERT(!s_globalBit_ly_Settings->q);
  s_globalBit_ly_Settings->q = this;
  setCurrentGroup( QLatin1String( "Bit.ly Shortener" ) );

  mLoginItem = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "login" ), mLogin );
  addItem( mLoginItem, QLatin1String( "login" ) );
  mApi_keyItem = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "api_key" ), mApi_key );
  addItem( mApi_keyItem, QLatin1String( "api_key" ) );
  mDomainItem = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "domain" ), mDomain );
  addItem( mDomainItem, QLatin1String( "domain" ) );
}

Bit_ly_Settings::~Bit_ly_Settings()
{
  if (!s_globalBit_ly_Settings.isDestroyed()) {
    s_globalBit_ly_Settings->q = 0;
  }
}

