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

#include "resourcebasesettings.h"

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

using namespace Akonadi;

namespace Akonadi {

class ResourceBaseSettingsHelper
{
  public:
    ResourceBaseSettingsHelper() noexcept : q(nullptr) {}
    ~ResourceBaseSettingsHelper() noexcept { delete q; q = nullptr; }
    ResourceBaseSettingsHelper(const ResourceBaseSettingsHelper&) = delete;
    ResourceBaseSettingsHelper& operator=(const ResourceBaseSettingsHelper&) = delete;
    ResourceBaseSettings *q;
};

}
Q_GLOBAL_STATIC(ResourceBaseSettingsHelper, s_globalResourceBaseSettings)
ResourceBaseSettings *ResourceBaseSettings::self()
{
  if (!s_globalResourceBaseSettings()->q) {
    new ResourceBaseSettings;
    s_globalResourceBaseSettings()->q->read();
  }

  return s_globalResourceBaseSettings()->q;
}

ResourceBaseSettings::ResourceBaseSettings( )
  : KConfigSkeleton( QStringLiteral( "resourcebaserc" ) )
{
  Q_ASSERT(!s_globalResourceBaseSettings()->q);
  s_globalResourceBaseSettings()->q = this;
  setCurrentGroup( QStringLiteral( "ConfigurationDialogRestrictions" ) );

  mMinimumCheckIntervalItem = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "MinimumCheckInterval" ), mMinimumCheckInterval, 5 );
  addItem( mMinimumCheckIntervalItem, QStringLiteral( "MinimumCheckInterval" ) );
}

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

