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

#include "fileviewsvnpluginsettings.h"

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

class FileViewSvnPluginSettingsHelper
{
  public:
    FileViewSvnPluginSettingsHelper() noexcept : q(nullptr) {}
    ~FileViewSvnPluginSettingsHelper() noexcept { delete q; q = nullptr; }
    FileViewSvnPluginSettingsHelper(const FileViewSvnPluginSettingsHelper&) = delete;
    FileViewSvnPluginSettingsHelper& operator=(const FileViewSvnPluginSettingsHelper&) = delete;
    FileViewSvnPluginSettings *q;
};
Q_GLOBAL_STATIC(FileViewSvnPluginSettingsHelper, s_globalFileViewSvnPluginSettings)
FileViewSvnPluginSettings *FileViewSvnPluginSettings::self()
{
  if (!s_globalFileViewSvnPluginSettings()->q) {
    new FileViewSvnPluginSettings;
    s_globalFileViewSvnPluginSettings()->q->read();
  }

  return s_globalFileViewSvnPluginSettings()->q;
}

FileViewSvnPluginSettings::FileViewSvnPluginSettings( )
  : KConfigSkeleton( QStringLiteral( "fileviewsvnpluginrc" ) )
{
  Q_ASSERT(!s_globalFileViewSvnPluginSettings()->q);
  s_globalFileViewSvnPluginSettings()->q = this;
  setCurrentGroup( QStringLiteral( "General" ) );

  KConfigSkeleton::ItemBool  *itemShowUpdates;
  itemShowUpdates = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "showUpdates" ), mShowUpdates, false );
  addItem( itemShowUpdates, QStringLiteral( "showUpdates" ) );
}

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

