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

#include "checkfoldersizeaccount.h"

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

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

  return s_globalCheckFolderSizeAccountSettings()->q;
}

CheckFolderSizeAccountSettings::CheckFolderSizeAccountSettings( )
  : KConfigSkeleton( QStringLiteral( "checkfoldersizeaccountrc" ) )
{
  Q_ASSERT(!s_globalCheckFolderSizeAccountSettings()->q);
  s_globalCheckFolderSizeAccountSettings()->q = this;
  setCurrentGroup( QStringLiteral( "Global" ) );

  mWarningSizeItem = new KConfigSkeleton::ItemLongLong( currentGroup(), QStringLiteral( "WarningSize" ), mWarningSize, 10000000 );
  addItem( mWarningSizeItem, QStringLiteral( "WarningSize" ) );
}

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

