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

#include "dolphin_versioncontrolsettings.h"

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

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

  return s_globalVersionControlSettings()->q;
}

VersionControlSettings::VersionControlSettings( )
  : KConfigSkeleton( QStringLiteral( "dolphinrc" ) )
{
  Q_ASSERT(!s_globalVersionControlSettings()->q);
  s_globalVersionControlSettings()->q = this;
  setCurrentGroup( QStringLiteral( "VersionControl" ) );

  KConfigSkeleton::ItemStringList  *itemEnabledPlugins;
  itemEnabledPlugins = new KConfigSkeleton::ItemStringList( currentGroup(), QStringLiteral( "enabledPlugins" ), mEnabledPlugins );
  addItem( itemEnabledPlugins, QStringLiteral( "enabledPlugins" ) );
}

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

