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

#include "mmssettings.h"

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

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

  return s_globalMmsSettings()->q;
}

MmsSettings::MmsSettings( )
  : KConfigSkeleton( QStringLiteral( "kget_mmsfactory.rc" ) )
{
  Q_ASSERT(!s_globalMmsSettings()->q);
  s_globalMmsSettings()->q = this;
  setCurrentGroup( QStringLiteral( "Threads" ) );

  KConfigSkeleton::ItemInt  *itemThreads;
  itemThreads = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "Threads" ), mThreads, 50 );
  addItem( itemThreads, QStringLiteral( "Threads" ) );
}

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

