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

#include "globalsettings.h"

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

using namespace Heaptrack;

namespace Heaptrack {

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()
{
  Q_ASSERT(!s_globalGlobalSettings()->q);
  s_globalGlobalSettings()->q = this;
  setCurrentGroup( QStringLiteral( "Heaptrack" ) );

  KConfigSkeleton::ItemPath  *itemHeaptrackExecutable;
  itemHeaptrackExecutable = new KConfigSkeleton::ItemPath( currentGroup(), QStringLiteral( "heaptrackExecutable" ), mHeaptrackExecutable, findExecutable(QStringLiteral("heaptrack")) );
  addItem( itemHeaptrackExecutable, QStringLiteral( "heaptrackExecutable" ) );
  KConfigSkeleton::ItemPath  *itemHeaptrackGuiExecutable;
  itemHeaptrackGuiExecutable = new KConfigSkeleton::ItemPath( currentGroup(), QStringLiteral( "heaptrackGuiExecutable" ), mHeaptrackGuiExecutable, findExecutable(QStringLiteral("heaptrack_gui")) );
  addItem( itemHeaptrackGuiExecutable, QStringLiteral( "heaptrackGuiExecutable" ) );
}

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

