// This file is generated by kconfig_compiler_kf6 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() noexcept : q(nullptr) {}
    ~DoNotTrackSettingsHelper() noexcept { 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;
  }
}

