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

#include "xmlstoragesettings.h"

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

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

  return s_globalXMLStorageSettings()->q;
}

XMLStorageSettings::XMLStorageSettings( )
  : KConfigSkeleton( QStringLiteral( "kmymoney/kmymoneyrc" ) )
{
  Q_ASSERT(!s_globalXMLStorageSettings()->q);
  s_globalXMLStorageSettings()->q = this;
}

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

