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

#include "sieveeditorglobalconfig.h"

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

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

  return s_globalSieveEditorGlobalConfig()->q;
}

SieveEditorGlobalConfig::SieveEditorGlobalConfig( )
  : KConfigSkeleton()
{
  Q_ASSERT(!s_globalSieveEditorGlobalConfig()->q);
  s_globalSieveEditorGlobalConfig()->q = this;
  setCurrentGroup( QStringLiteral( "Editor" ) );

  mWrapTextItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "WrapText" ), mWrapText, false );
  addItem( mWrapTextItem, QStringLiteral( "WrapText" ) );

  setCurrentGroup( QStringLiteral( "General" ) );

  mPreviousNewFeaturesMD5Item = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "PreviousNewFeaturesMD5" ), mPreviousNewFeaturesMD5 );
  addItem( mPreviousNewFeaturesMD5Item, QStringLiteral( "PreviousNewFeaturesMD5" ) );

  setCurrentGroup( QStringLiteral( "Views" ) );

  mShowMenuBarItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ShowMenuBar" ), mShowMenuBar, true );
  addItem( mShowMenuBarItem, QStringLiteral( "ShowMenuBar" ) );
}

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

