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

#include "pluginsettings.h"

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

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

  return s_globalPluginSettings()->q;
}

PluginSettings::PluginSettings( )
  : KConfigSkeleton( QStringLiteral( "kmymoney/csvimporterrc" ) )
{
  Q_ASSERT(!s_globalPluginSettings()->q);
  s_globalPluginSettings()->q = this;
  setCurrentGroup( QStringLiteral( "Misc" ) );

  KConfigSkeleton::ItemBool  *itemAutoFieldDelimiter;
  itemAutoFieldDelimiter = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "AutoFieldDelimiter" ), mAutoFieldDelimiter );
  addItem( itemAutoFieldDelimiter, QStringLiteral( "AutoFieldDelimiter" ) );
  KConfigSkeleton::ItemBool  *itemAutoDecimalSymbol;
  itemAutoDecimalSymbol = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "AutoDecimalSymbol" ), mAutoDecimalSymbol );
  addItem( itemAutoDecimalSymbol, QStringLiteral( "AutoDecimalSymbol" ) );
  KConfigSkeleton::ItemBool  *itemAutoDateFormat;
  itemAutoDateFormat = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "AutoDateFormat" ), mAutoDateFormat );
  addItem( itemAutoDateFormat, QStringLiteral( "AutoDateFormat" ) );
  KConfigSkeleton::ItemString  *itemQifExportProfile;
  itemQifExportProfile = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "QifExportProfile" ), mQifExportProfile );
  addItem( itemQifExportProfile, QStringLiteral( "QifExportProfile" ) );
}

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

