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

#include "globalsettings_messageviewer.h"

#include <klocalizedstring.h>

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

using namespace MessageViewer;

namespace MessageViewer {

class MessageViewerSettingsBaseHelper
{
  public:
    MessageViewerSettingsBaseHelper() : q(nullptr) {}
    ~MessageViewerSettingsBaseHelper() { delete q; q = nullptr; }
    MessageViewerSettingsBaseHelper(const MessageViewerSettingsBaseHelper&) = delete;
    MessageViewerSettingsBaseHelper& operator=(const MessageViewerSettingsBaseHelper&) = delete;
    MessageViewerSettingsBase *q;
};

}
Q_GLOBAL_STATIC(MessageViewerSettingsBaseHelper, s_globalMessageViewerSettingsBase)
MessageViewerSettingsBase *MessageViewerSettingsBase::self()
{
  if (!s_globalMessageViewerSettingsBase()->q) {
    new MessageViewerSettingsBase;
    s_globalMessageViewerSettingsBase()->q->read();
  }

  return s_globalMessageViewerSettingsBase()->q;
}

MessageViewerSettingsBase::MessageViewerSettingsBase( )
  : KConfigSkeleton( QStringLiteral( "mailviewerrc" ) )
{
  Q_ASSERT(!s_globalMessageViewerSettingsBase()->q);
  s_globalMessageViewerSettingsBase()->q = this;
  setCurrentGroup( QStringLiteral( "Print" ) );

  mPrintSelectedTextItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "print-selected-text" ), mPrintSelectedText, false );
  mPrintSelectedTextItem->setLabel( i18n("Only print selected text in viewer") );
  addItem( mPrintSelectedTextItem, QStringLiteral( "PrintSelectedText" ) );
  mRespectExpandCollapseSettingsItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "respect-expand-collapse" ), mRespectExpandCollapseSettings, false );
  mRespectExpandCollapseSettingsItem->setLabel( i18n("Respect expand/collapse quote mark which is defined in settings during printing.") );
  addItem( mRespectExpandCollapseSettingsItem, QStringLiteral( "RespectExpandCollapseSettings" ) );
  mPrintBackgroundColorImagesItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "print-background-color-images" ), mPrintBackgroundColorImages, true );
  mPrintBackgroundColorImagesItem->setLabel( i18n("Specifies whether the background color and images are also drawn when the page is printed.") );
  addItem( mPrintBackgroundColorImagesItem, QStringLiteral( "PrintBackgroundColorImages" ) );
  mAlwaysShowEncryptionSignatureDetailsItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "print-always-show-encryption-signature-details" ), mAlwaysShowEncryptionSignatureDetails, false );
  mAlwaysShowEncryptionSignatureDetailsItem->setLabel( i18n("Always show encryption/signature details when we print message") );
  addItem( mAlwaysShowEncryptionSignatureDetailsItem, QStringLiteral( "AlwaysShowEncryptionSignatureDetails" ) );

  setCurrentGroup( QStringLiteral( "Fonts" ) );

  mFixedFontItem = new KConfigSkeleton::ItemFont( currentGroup(), QStringLiteral( "fixed-font" ), mFixedFont, QFontDatabase::systemFont(QFontDatabase::FixedFont) );
  mFixedFontItem->setLabel( i18n("fixed-font") );
  addItem( mFixedFontItem, QStringLiteral( "FixedFont" ) );
  mMinimumFontSizeItem = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "MinimumFontSize" ), mMinimumFontSize, 8 );
  mMinimumFontSizeItem->setLabel( i18n("When we render html do not use font size inferior to minimum size.") );
  addItem( mMinimumFontSizeItem, QStringLiteral( "MinimumFontSize" ) );
  mBodyFontItem = new KConfigSkeleton::ItemFont( currentGroup(), QStringLiteral( "body-font" ), mBodyFont, QFontDatabase::systemFont(QFontDatabase::GeneralFont) );
  mBodyFontItem->setLabel( i18n("Specifies the font to use for the message body") );
  addItem( mBodyFontItem, QStringLiteral( "BodyFont" ) );
  mPrintFontItem = new KConfigSkeleton::ItemFont( currentGroup(), QStringLiteral( "print-font" ), mPrintFont, QFontDatabase::systemFont(QFontDatabase::GeneralFont) );
  mPrintFontItem->setLabel( i18n("Specifies the font to use for printing") );
  addItem( mPrintFontItem, QStringLiteral( "PrintFont" ) );

  setCurrentGroup( QStringLiteral( "Security" ) );

  mCheckPhishingUrlItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "CheckPhishingUrl" ), mCheckPhishingUrl, false );
  mCheckPhishingUrlItem->setLabel( i18n("Check if url can be a phishing") );
  addItem( mCheckPhishingUrlItem, QStringLiteral( "CheckPhishingUrl" ) );

  setCurrentGroup( QStringLiteral( "Reader" ) );

  mCloseAfterReplyOrForwardItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "CloseAfterReplyOrForward" ), mCloseAfterReplyOrForward, false );
  mCloseAfterReplyOrForwardItem->setLabel( i18n("Close message window after replying or forwarding") );
  addItem( mCloseAfterReplyOrForwardItem, QStringLiteral( "CloseAfterReplyOrForward" ) );
  mZoomFactorItem = new KConfigSkeleton::ItemDouble( currentGroup(), QStringLiteral( "ZoomFactor" ), mZoomFactor, 100.0 );
  mZoomFactorItem->setLabel( i18n("ZoomFactor") );
  addItem( mZoomFactorItem, QStringLiteral( "ZoomFactor" ) );
  mShowEmoticonsItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ShowEmoticons" ), mShowEmoticons, true );
  mShowEmoticonsItem->setLabel( i18n("ShowEmoticons") );
  addItem( mShowEmoticonsItem, QStringLiteral( "ShowEmoticons" ) );
  mAutoImportKeysItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "AutoImportKeys" ), mAutoImportKeys, false );
  mAutoImportKeysItem->setLabel( i18n("AutoImportKeys") );
  addItem( mAutoImportKeysItem, QStringLiteral( "AutoImportKeys" ) );
  mShowExpandQuotesMarkItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ShowExpandQuotesMark" ), mShowExpandQuotesMark, false );
  mShowExpandQuotesMarkItem->setLabel( i18n("Show expand/collapse quote marks") );
  mShowExpandQuotesMarkItem->setWhatsThis( i18n("Enable this option to show different levels of quoted text. Disable to hide the levels of quoted text.") );
  addItem( mShowExpandQuotesMarkItem, QStringLiteral( "ShowExpandQuotesMark" ) );
  mCollapseQuoteLevelSpinItem = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "CollapseQuoteLevelSpin" ), mCollapseQuoteLevelSpin, 3 );
  mCollapseQuoteLevelSpinItem->setMinValue(0);
  mCollapseQuoteLevelSpinItem->setMaxValue(10);
  mCollapseQuoteLevelSpinItem->setLabel( i18n("Automatic collapse level:") );
  addItem( mCollapseQuoteLevelSpinItem, QStringLiteral( "CollapseQuoteLevelSpin" ) );
  mShrinkQuotesItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ShrinkQuotes" ), mShrinkQuotes, false );
  mShrinkQuotesItem->setLabel( i18n("Reduce font size for quoted text") );
  mShrinkQuotesItem->setWhatsThis( i18n("Enable this option to show quoted text with a smaller font.") );
  addItem( mShrinkQuotesItem, QStringLiteral( "ShrinkQuotes" ) );
  mAlwaysDecryptItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "AlwaysDecrypt" ), mAlwaysDecrypt, false );
  mAlwaysDecryptItem->setLabel( i18n("Always decrypt messages when viewing or ask before decrypting") );
  addItem( mAlwaysDecryptItem, QStringLiteral( "AlwaysDecrypt" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valuesMimeTreeMode2;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Never");
    choice.label = i18n("Show never");
    valuesMimeTreeMode2.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Always");
    choice.label = i18n("Show always");
    valuesMimeTreeMode2.append( choice );
  }
  mMimeTreeMode2Item = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "MimeTreeMode2" ), mMimeTreeMode2, valuesMimeTreeMode2, EnumMimeTreeMode2::Never );
  mMimeTreeMode2Item->setLabel( i18n("Message Structure Viewer") );
  addItem( mMimeTreeMode2Item, QStringLiteral( "MimeTreeMode2" ) );
  mMimePaneHeightItem = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "MimePaneHeight" ), mMimePaneHeight, 100 );
  mMimePaneHeightItem->setLabel( i18n("MimePaneHeight") );
  addItem( mMimePaneHeightItem, QStringLiteral( "MimePaneHeight" ) );
  mMessagePaneHeightItem = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "MessagePaneHeight" ), mMessagePaneHeight, 180 );
  mMessagePaneHeightItem->setLabel( i18n("MessagePaneHeight") );
  addItem( mMessagePaneHeightItem, QStringLiteral( "MessagePaneHeight" ) );
  mHeaderPluginStyleNameItem = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "header-plugin-style-name" ), mHeaderPluginStyleName, QStringLiteral( "defaultgrantlee" ) );
  mHeaderPluginStyleNameItem->setLabel( i18n("What style of headers should be displayed") );
  addItem( mHeaderPluginStyleNameItem, QStringLiteral( "headerPluginStyleName" ) );
  mHeaderStyleItem = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "header-style" ), mHeaderStyle, QStringLiteral( "fancy" ) );
  mHeaderStyleItem->setLabel( i18n("What style of headers should be displayed") );
  addItem( mHeaderStyleItem, QStringLiteral( "headerStyle" ) );
  mHeaderSetDisplayedItem = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "header-set-displayed" ), mHeaderSetDisplayed, QStringLiteral( "rich" ) );
  mHeaderSetDisplayedItem->setLabel( i18n("How much of headers should be displayed") );
  addItem( mHeaderSetDisplayedItem, QStringLiteral( "headerSetDisplayed" ) );
  mHtmlMailItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "htmlMail" ), mHtmlMail, false );
  mHtmlMailItem->setLabel( i18n("Prefer HTML to plain text") );
  addItem( mHtmlMailItem, QStringLiteral( "htmlMail" ) );
  mHtmlLoadExternalItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "htmlLoadExternal" ), mHtmlLoadExternal, false );
  mHtmlLoadExternalItem->setLabel( i18n("Allow messages to load external references from the Internet") );
  addItem( mHtmlLoadExternalItem, QStringLiteral( "htmlLoadExternal" ) );
  mAttachmentStrategyItem = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "attachment-strategy" ), mAttachmentStrategy, QStringLiteral( "Smart" ) );
  mAttachmentStrategyItem->setLabel( i18n("How attachments are shown") );
  addItem( mAttachmentStrategyItem, QStringLiteral( "attachmentStrategy" ) );
  mRecycleQuoteColorsItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "RecycleQuoteColors" ), mRecycleQuoteColors, false );
  mRecycleQuoteColorsItem->setLabel( i18n("Specifies whether to reuse the quote color, beyond the 3rd level") );
  addItem( mRecycleQuoteColorsItem, QStringLiteral( "RecycleQuoteColors" ) );
  mAccessKeyEnabledItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "AccessKeyEnabled" ), mAccessKeyEnabled, true );
  mAccessKeyEnabledItem->setLabel( i18n("Activate Access Key") );
  addItem( mAccessKeyEnabledItem, QStringLiteral( "AccessKeyEnabled" ) );
  mScamDetectionEnabledItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ScamDetectionEnabled" ), mScamDetectionEnabled, true );
  mScamDetectionEnabledItem->setLabel( i18n("KMail can analyze messages for suspected email scams by looking for common techniques used to deceive you") );
  addItem( mScamDetectionEnabledItem, QStringLiteral( "ScamDetectionEnabled" ) );
  mScamDetectionWhiteListItem = new KConfigSkeleton::ItemStringList( currentGroup(), QStringLiteral( "ScamDetectionWhiteList" ), mScamDetectionWhiteList );
  mScamDetectionWhiteListItem->setLabel( i18n("List of emails in scam white list") );
  addItem( mScamDetectionWhiteListItem, QStringLiteral( "ScamDetectionWhiteList" ) );
  mMailTrackingUrlEnabledItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "MailTrackingUrlEnabled" ), mMailTrackingUrlEnabled, true );
  mMailTrackingUrlEnabledItem->setLabel( i18n("Scan emails for tracking URLs") );
  addItem( mMailTrackingUrlEnabledItem, QStringLiteral( "MailTrackingUrlEnabled" ) );

  setCurrentGroup( QStringLiteral( "MDN" ) );

  mNotSendWhenEncryptedItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "not-send-when-encrypted" ), mNotSendWhenEncrypted, true );
  mNotSendWhenEncryptedItem->setLabel( i18n("Do not send MDNs in response to encrypted messages") );
  addItem( mNotSendWhenEncryptedItem, QStringLiteral( "notSendWhenEncrypted" ) );
  mDefaultPolicyItem = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "default-policy" ), mDefaultPolicy, 0 );
  mDefaultPolicyItem->setLabel( i18n("Specifies the default policy to use, for the Message Disposition Notifications (for internal use only)") );
  addItem( mDefaultPolicyItem, QStringLiteral( "DefaultPolicy" ) );
  mQuoteMessageItem = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "quote-message" ), mQuoteMessage, 0 );
  mQuoteMessageItem->setLabel( i18n("Specifies the default quoting action to take, when replying to a message (for internal use only)") );
  addItem( mQuoteMessageItem, QStringLiteral( "QuoteMessage" ) );

  setCurrentGroup( QStringLiteral( "Behaviour" ) );

  mDelayedMarkAsReadItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "DelayedMarkAsRead" ), mDelayedMarkAsRead, true );
  mDelayedMarkAsReadItem->setLabel( i18n("DelayedMarkAsRead") );
  addItem( mDelayedMarkAsReadItem, QStringLiteral( "DelayedMarkAsRead" ) );
  mDelayedMarkTimeItem = new KConfigSkeleton::ItemUInt( currentGroup(), QStringLiteral( "DelayedMarkTime" ), mDelayedMarkTime, 0 );
  mDelayedMarkTimeItem->setLabel( i18n("DelayedMarkTime") );
  addItem( mDelayedMarkTimeItem, QStringLiteral( "DelayedMarkTime" ) );

  setCurrentGroup( QStringLiteral( "Invitations" ) );

  mLegacyMangleFromToHeadersItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "LegacyMangleFromToHeaders" ), mLegacyMangleFromToHeaders, false );
  mLegacyMangleFromToHeadersItem->setLabel( i18n("Mangle From:/To: headers in replies to replies") );
  mLegacyMangleFromToHeadersItem->setWhatsThis( i18n("Microsoft Outlook has a number of shortcomings in its implementation of the iCalendar standard; this option works around one of them. If you have problems with Outlook users not being able to get your replies, try setting this option.") );
  addItem( mLegacyMangleFromToHeadersItem, QStringLiteral( "LegacyMangleFromToHeaders" ) );
  mLegacyBodyInvitesItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "LegacyBodyInvites" ), mLegacyBodyInvites, false );
  mLegacyBodyInvitesItem->setLabel( i18n("Send groupware invitations in the mail body") );
  mLegacyBodyInvitesItem->setWhatsThis( i18n("Microsoft Outlook has a number of shortcomings in its implementation of the iCalendar standard; this option works around one of them. If you have problems with Outlook users not being able to get your invitations, try setting this option.") );
  addItem( mLegacyBodyInvitesItem, QStringLiteral( "LegacyBodyInvites" ) );
  mExchangeCompatibleInvitationsItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ExchangeCompatibleInvitations" ), mExchangeCompatibleInvitations, false );
  mExchangeCompatibleInvitationsItem->setLabel( i18n("Exchange-compatible invitation naming") );
  mExchangeCompatibleInvitationsItem->setWhatsThis( i18n("Microsoft Outlook, when used in combination with a Microsoft Exchange server, has a problem understanding standards-compliant groupware email. Turn this option on to send groupware invitations in a way that Microsoft Exchange understands.") );
  addItem( mExchangeCompatibleInvitationsItem, QStringLiteral( "ExchangeCompatibleInvitations" ) );
  mAutomaticSendingItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "AutomaticSending" ), mAutomaticSending, true );
  mAutomaticSendingItem->setLabel( i18n("Automatic invitation sending") );
  mAutomaticSendingItem->setWhatsThis( i18n("When this is checked, you will not see the mail composer window. Instead, all invitation mails are sent automatically. If you want to see the mail before sending it, you can uncheck this option. However, be aware that the text in the composer window is in iCalendar syntax, and you should not try modifying it by hand.") );
  addItem( mAutomaticSendingItem, QStringLiteral( "AutomaticSending" ) );
  mDeleteInvitationEmailsAfterSendingReplyItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "DeleteInvitationEmailsAfterSendingReply" ), mDeleteInvitationEmailsAfterSendingReply, false );
  mDeleteInvitationEmailsAfterSendingReplyItem->setLabel( i18n("Delete invitation emails after the reply to them has been sent") );
  mDeleteInvitationEmailsAfterSendingReplyItem->setWhatsThis( i18n("When this is checked, received invitation emails that have been replied to will be moved to the Trash folder, once the reply has been successfully sent.") );
  addItem( mDeleteInvitationEmailsAfterSendingReplyItem, QStringLiteral( "DeleteInvitationEmailsAfterSendingReply" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valuesAskForCommentWhenReactingToInvitation;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("NeverAsk");
    valuesAskForCommentWhenReactingToInvitation.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("AskForAllButAcceptance");
    valuesAskForCommentWhenReactingToInvitation.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("AlwaysAsk");
    valuesAskForCommentWhenReactingToInvitation.append( choice );
  }
  mAskForCommentWhenReactingToInvitationItem = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "AskForCommentWhenReactingToInvitation" ), mAskForCommentWhenReactingToInvitation, valuesAskForCommentWhenReactingToInvitation, EnumAskForCommentWhenReactingToInvitation::AskForAllButAcceptance );
  mAskForCommentWhenReactingToInvitationItem->setLabel( i18n("AskForCommentWhenReactingToInvitation") );
  addItem( mAskForCommentWhenReactingToInvitationItem, QStringLiteral( "AskForCommentWhenReactingToInvitation" ) );

  setCurrentGroup( QStringLiteral( "Composer" ) );

  mUseFixedFontItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "use-fixed-font" ), mUseFixedFont, false );
  mUseFixedFontItem->setLabel( i18n("Use Fi&xed Font") );
  addItem( mUseFixedFontItem, QStringLiteral( "UseFixedFont" ) );

  setCurrentGroup( QStringLiteral( "Todo" ) );

  mLastSelectedFolderItem = new KConfigSkeleton::ItemLongLong( currentGroup(), QStringLiteral( "LastSelectedFolder" ), mLastSelectedFolder, -1 );
  mLastSelectedFolderItem->setLabel( i18n("LastSelectedFolder") );
  mLastSelectedFolderItem->setWhatsThis( i18n("The most recent selected folder using for Todo.") );
  addItem( mLastSelectedFolderItem, QStringLiteral( "LastSelectedFolder" ) );

  setCurrentGroup( QStringLiteral( "Event" ) );

  mLastEventSelectedFolderItem = new KConfigSkeleton::ItemLongLong( currentGroup(), QStringLiteral( "LastEventSelectedFolder" ), mLastEventSelectedFolder, -1 );
  mLastEventSelectedFolderItem->setLabel( i18n("LastEventSelectedFolder") );
  mLastEventSelectedFolderItem->setWhatsThis( i18n("The most recent selected folder using for Event.") );
  addItem( mLastEventSelectedFolderItem, QStringLiteral( "LastEventSelectedFolder" ) );

  setCurrentGroup( QStringLiteral( "Note" ) );

  mLastNoteSelectedFolderItem = new KConfigSkeleton::ItemLongLong( currentGroup(), QStringLiteral( "LastNoteSelectedFolder" ), mLastNoteSelectedFolder, -1 );
  mLastNoteSelectedFolderItem->setLabel( i18n("LastNoteSelectedFolder") );
  mLastNoteSelectedFolderItem->setWhatsThis( i18n("The most recent selected folder using for Notes.") );
  addItem( mLastNoteSelectedFolderItem, QStringLiteral( "LastNoteSelectedFolder" ) );

  setCurrentGroup( QStringLiteral( "DKIM" ) );

  mEnabledDkimItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "EnabledDkim" ), mEnabledDkim, false );
  mEnabledDkimItem->setLabel( i18n("EnabledDkim") );
  addItem( mEnabledDkimItem, QStringLiteral( "EnabledDkim" ) );
  mSaveDkimResultItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "SaveDkimResult" ), mSaveDkimResult, false );
  mSaveDkimResultItem->setLabel( i18n("SaveDkimResult") );
  addItem( mSaveDkimResultItem, QStringLiteral( "SaveDkimResult" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valuesSaveKey;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("NotSaving");
    valuesSaveKey.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Save");
    valuesSaveKey.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("SaveAndCompare");
    valuesSaveKey.append( choice );
  }
  mSaveKeyItem = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "SaveKey" ), mSaveKey, valuesSaveKey, EnumSaveKey::NotSaving );
  mSaveKeyItem->setLabel( i18n("SaveKey") );
  addItem( mSaveKeyItem, QStringLiteral( "SaveKey" ) );
  mCheckIfEmailShouldBeSignedItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "CheckIfEmailShouldBeSigned" ), mCheckIfEmailShouldBeSigned, false );
  mCheckIfEmailShouldBeSignedItem->setLabel( i18n("CheckIfEmailShouldBeSigned") );
  addItem( mCheckIfEmailShouldBeSignedItem, QStringLiteral( "CheckIfEmailShouldBeSigned" ) );
  mUseDMarcItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "UseDMarc" ), mUseDMarc, false );
  mUseDMarcItem->setLabel( i18n("UseDMarc") );
  addItem( mUseDMarcItem, QStringLiteral( "UseDMarc" ) );
  mUseDefaultRulesItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "UseDefaultRules" ), mUseDefaultRules, false );
  mUseDefaultRulesItem->setLabel( i18n("UseDefaultRules") );
  addItem( mUseDefaultRulesItem, QStringLiteral( "UseDefaultRules" ) );
  mAutogenerateRuleItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "AutogenerateRule" ), mAutogenerateRule, false );
  mAutogenerateRuleItem->setLabel( i18n("AutogenerateRule") );
  addItem( mAutogenerateRuleItem, QStringLiteral( "AutogenerateRule" ) );
  mAutogenerateRuleOnlyIfSenderOnSDIDItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "AutogenerateRuleOnlyIfSenderOnSDID" ), mAutogenerateRuleOnlyIfSenderOnSDID, false );
  mAutogenerateRuleOnlyIfSenderOnSDIDItem->setLabel( i18n("AutogenerateRuleOnlyIfSenderOnSDID") );
  addItem( mAutogenerateRuleOnlyIfSenderOnSDIDItem, QStringLiteral( "AutogenerateRuleOnlyIfSenderOnSDID" ) );
  mUseAuthenticationResultsItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "UseAuthenticationResults" ), mUseAuthenticationResults, false );
  mUseAuthenticationResultsItem->setLabel( i18n("UseAuthenticationResults") );
  addItem( mUseAuthenticationResultsItem, QStringLiteral( "UseAuthenticationResults" ) );
  mUseRelaxedParsingAuthenticationResultsItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "UseRelaxedParsingAuthenticationResults" ), mUseRelaxedParsingAuthenticationResults, false );
  mUseRelaxedParsingAuthenticationResultsItem->setLabel( i18n("UseRelaxedParsingAuthenticationResults") );
  addItem( mUseRelaxedParsingAuthenticationResultsItem, QStringLiteral( "UseRelaxedParsingAuthenticationResults" ) );
  mUseOnlyAuthenticationResultsItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "UseOnlyAuthenticationResults" ), mUseOnlyAuthenticationResults, false );
  mUseOnlyAuthenticationResultsItem->setLabel( i18n("UseOnlyAuthenticationResults") );
  addItem( mUseOnlyAuthenticationResultsItem, QStringLiteral( "UseOnlyAuthenticationResults" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valuesPublicRsaTooSmall;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Nothing");
    valuesPublicRsaTooSmall.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Warning");
    valuesPublicRsaTooSmall.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Error");
    valuesPublicRsaTooSmall.append( choice );
  }
  mPublicRsaTooSmallItem = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "PublicRsaTooSmall" ), mPublicRsaTooSmall, valuesPublicRsaTooSmall, EnumPublicRsaTooSmall::Warning );
  mPublicRsaTooSmallItem->setLabel( i18n("PublicRsaTooSmall") );
  addItem( mPublicRsaTooSmallItem, QStringLiteral( "PublicRsaTooSmall" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valuesPolicyRsaSha1;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Nothing");
    valuesPolicyRsaSha1.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Warning");
    valuesPolicyRsaSha1.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Error");
    valuesPolicyRsaSha1.append( choice );
  }
  mPolicyRsaSha1Item = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "PolicyRsaSha1" ), mPolicyRsaSha1, valuesPolicyRsaSha1, EnumPolicyRsaSha1::Warning );
  mPolicyRsaSha1Item->setLabel( i18n("PolicyRsaSha1") );
  addItem( mPolicyRsaSha1Item, QStringLiteral( "PolicyRsaSha1" ) );
  mVerifySignatureWhenOnlyTestItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "VerifySignatureWhenOnlyTest" ), mVerifySignatureWhenOnlyTest, false );
  mVerifySignatureWhenOnlyTestItem->setLabel( i18n("VerifySignatureWhenOnlyTest") );
  addItem( mVerifySignatureWhenOnlyTestItem, QStringLiteral( "VerifySignatureWhenOnlyTest" ) );
}

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

