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

#include "globalsettings.h"

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

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

  return s_globalGlobalSettings()->q;
}

GlobalSettings::GlobalSettings(  )
  : KConfigSkeleton( QStringLiteral( "bluedevilglobalrc" ) )
{
  Q_ASSERT(!s_globalGlobalSettings()->q);
  s_globalGlobalSettings()->q = this;
  setCurrentGroup( QStringLiteral( "General" ) );

  KConfigSkeleton::ItemBool  *itemEnableGlobalBluetooth;
  itemEnableGlobalBluetooth = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "enableGlobalBluetooth" ), mEnableGlobalBluetooth, true );
  addItem( itemEnableGlobalBluetooth, QStringLiteral( "enableGlobalBluetooth" ) );
}

GlobalSettings::~GlobalSettings()
{
  s_globalGlobalSettings()->q = nullptr;
}

