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

#include "yourlssettings.h"

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

class YourlsSettingsHelper
{
  public:
    YourlsSettingsHelper() : q(0) {}
    ~YourlsSettingsHelper() { delete q; }
    YourlsSettings *q;
};
K_GLOBAL_STATIC(YourlsSettingsHelper, s_globalYourlsSettings)
YourlsSettings *YourlsSettings::self()
{
  if (!s_globalYourlsSettings->q) {
    new YourlsSettings;
    s_globalYourlsSettings->q->readConfig();
  }

  return s_globalYourlsSettings->q;
}

YourlsSettings::YourlsSettings(  )
  : KConfigSkeleton( QLatin1String( "choqokrc" ) )
{
  Q_ASSERT(!s_globalYourlsSettings->q);
  s_globalYourlsSettings->q = this;
  setCurrentGroup( QLatin1String( "Yourls" ) );

  mYourlsHostItem = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "yourlsHost" ), mYourlsHost );
  addItem( mYourlsHostItem, QLatin1String( "yourlsHost" ) );
  mUsernameItem = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "username" ), mUsername );
  addItem( mUsernameItem, QLatin1String( "username" ) );
}

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

