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

#include "textautocorrectionsetting_base.h"

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

using namespace TextAutoCorrectionCore;

namespace TextAutoCorrectionCore {

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

}
Q_GLOBAL_STATIC(TextAutoCorrectionSettingsBaseHelper, s_globalTextAutoCorrectionSettingsBase)
TextAutoCorrectionSettingsBase *TextAutoCorrectionSettingsBase::self()
{
  if (!s_globalTextAutoCorrectionSettingsBase()->q) {
    new TextAutoCorrectionSettingsBase;
    s_globalTextAutoCorrectionSettingsBase()->q->read();
  }

  return s_globalTextAutoCorrectionSettingsBase()->q;
}

TextAutoCorrectionSettingsBase::TextAutoCorrectionSettingsBase( )
  : KConfigSkeleton( QStringLiteral( "autocorrectionrc" ) )
{
  Q_ASSERT(!s_globalTextAutoCorrectionSettingsBase()->q);
  s_globalTextAutoCorrectionSettingsBase()->q = this;
  setCurrentGroup( QStringLiteral( "Autocorrect" ) );

  mEnabledItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "enabled" ), mEnabled, false );
  addItem( mEnabledItem, QStringLiteral( "Enabled" ) );
  mUppercaseFirstCharOfSentenceItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "upper-case-first-char-of-sentence" ), mUppercaseFirstCharOfSentence, false );
  addItem( mUppercaseFirstCharOfSentenceItem, QStringLiteral( "UppercaseFirstCharOfSentence" ) );
  mFixTwoUppercaseCharsItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "fix-two-upper-case-chars" ), mFixTwoUppercaseChars, false );
  addItem( mFixTwoUppercaseCharsItem, QStringLiteral( "FixTwoUppercaseChars" ) );
  mSingleSpacesItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "single-spaces" ), mSingleSpaces, false );
  addItem( mSingleSpacesItem, QStringLiteral( "SingleSpaces" ) );
  mAutoFractionsItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "auto-fractions" ), mAutoFractions, false );
  addItem( mAutoFractionsItem, QStringLiteral( "AutoFractions" ) );
  mCapitalizeWeekDaysItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "capitalize-week-days" ), mCapitalizeWeekDays, false );
  addItem( mCapitalizeWeekDaysItem, QStringLiteral( "CapitalizeWeekDays" ) );
  mAdvancedAutocorrectItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "advanced-autocorrect" ), mAdvancedAutocorrect, false );
  addItem( mAdvancedAutocorrectItem, QStringLiteral( "AdvancedAutocorrect" ) );
  mReplaceDoubleQuotesItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "replace-double-quotes" ), mReplaceDoubleQuotes, false );
  addItem( mReplaceDoubleQuotesItem, QStringLiteral( "ReplaceDoubleQuotes" ) );
  mReplaceSingleQuotesItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "replace-single-quotes" ), mReplaceSingleQuotes, false );
  addItem( mReplaceSingleQuotesItem, QStringLiteral( "ReplaceSingleQuotes" ) );
  mAutoFormatUrlItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "autoformat-url" ), mAutoFormatUrl, false );
  addItem( mAutoFormatUrlItem, QStringLiteral( "AutoFormatUrl" ) );
  mAutoBoldUnderlineItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "auto-bold-underline" ), mAutoBoldUnderline, false );
  addItem( mAutoBoldUnderlineItem, QStringLiteral( "AutoBoldUnderline" ) );
  mSuperScriptItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "super-script" ), mSuperScript, false );
  addItem( mSuperScriptItem, QStringLiteral( "SuperScript" ) );
  mAddNonBreakingSpaceInFrenchItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "add-non-breaking-space" ), mAddNonBreakingSpaceInFrench, false );
  addItem( mAddNonBreakingSpaceInFrenchItem, QStringLiteral( "AddNonBreakingSpaceInFrench" ) );
  mReplaceDoubleQuotesByFrenchQuotesItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "replace-double-quotes-by-french-quotes" ), mReplaceDoubleQuotesByFrenchQuotes, false );
  addItem( mReplaceDoubleQuotesByFrenchQuotesItem, QStringLiteral( "ReplaceDoubleQuotesByFrenchQuotes" ) );
  mTypographicSingleQuotesItem = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "typographic-single-quotes" ), mTypographicSingleQuotes );
  addItem( mTypographicSingleQuotesItem, QStringLiteral( "TypographicSingleQuotes" ) );
  mTypographicDoubleQuotesItem = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "typographic-double-quotes" ), mTypographicDoubleQuotes );
  addItem( mTypographicDoubleQuotesItem, QStringLiteral( "TypographicDoubleQuotes" ) );
  mCustomWritablePathItem = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "custom-writable-path" ), mCustomWritablePath );
  addItem( mCustomWritablePathItem, QStringLiteral( "CustomWritablePath" ) );
  mCustomSystemPathItem = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "custom-system-path" ), mCustomSystemPath );
  addItem( mCustomSystemPathItem, QStringLiteral( "CustomSystemPath" ) );
}

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

