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

#include "twitgoosettings.h"

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

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

  return s_globalTwitgooSettings()->q;
}

TwitgooSettings::TwitgooSettings( )
  : KConfigSkeleton( QStringLiteral( "choqokrc" ) )
{
  Q_ASSERT(!s_globalTwitgooSettings()->q);
  s_globalTwitgooSettings()->q = this;
  setCurrentGroup( QStringLiteral( "Twitgoo ImageUploader" ) );

  mAliasItem = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "alias" ), mAlias );
  addItem( mAliasItem, QStringLiteral( "alias" ) );
  mDirectLinkItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "directLink" ), mDirectLink );
  addItem( mDirectLinkItem, QStringLiteral( "directLink" ) );
}

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

