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

#include "donottracksettings.h"

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

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

  return s_globalDoNotTrackSettings()->q;
}

DoNotTrackSettings::DoNotTrackSettings( )
  : KConfigSkeleton( QStringLiteral( "dotnottrackrc" ) )
{
  Q_ASSERT(!s_globalDoNotTrackSettings()->q);
  s_globalDoNotTrackSettings()->q = this;
  setCurrentGroup( QStringLiteral( "Global" ) );

  mDoNotTrackItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "donottrack" ), mDoNotTrack, true );
  addItem( mDoNotTrackItem, QStringLiteral( "DoNotTrack" ) );
}

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

