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

#include "konqsettings.h"

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

using namespace Konq;

namespace Konq {

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

}
Q_GLOBAL_STATIC(SettingsHelper, s_globalSettings)
Settings *Settings::self()
{
  if (!s_globalSettings()->q) {
    new Settings;
    s_globalSettings()->q->read();
  }

  return s_globalSettings()->q;
}

Settings::Settings( )
  : Konq::SettingsBase( QStringLiteral( "konquerorrc" ) )
{
  Q_ASSERT(!s_globalSettings()->q);
  s_globalSettings()->q = this;
  setCurrentGroup( QStringLiteral( "UserSettings" ) );

  Konq::SettingsBase::ItemPath  *itemStartURL;
  itemStartURL = new Konq::SettingsBase::ItemPath( currentGroup(), QStringLiteral( "StartURL" ), mStartURL, QStringLiteral( "konq:konqueror" ) );
  addItem( itemStartURL, QStringLiteral( "StartURL" ) );
  Konq::SettingsBase::ItemPath  *itemHomeURL;
  itemHomeURL = new Konq::SettingsBase::ItemPath( currentGroup(), QStringLiteral( "HomeURL" ), mHomeURL, QStringLiteral( "https://www.kde.org/" ) );
  addItem( itemHomeURL, QStringLiteral( "HomeURL" ) );
  Konq::SettingsBase::ItemBool  *itemAlwaysDuplicatePageWhenSplittingView;
  itemAlwaysDuplicatePageWhenSplittingView = new Konq::SettingsBase::ItemBool( currentGroup(), QStringLiteral( "AlwaysDuplicatePageWhenSplittingView" ), mAlwaysDuplicatePageWhenSplittingView, true );
  addItem( itemAlwaysDuplicatePageWhenSplittingView, QStringLiteral( "AlwaysDuplicatePageWhenSplittingView" ) );
  Konq::SettingsBase::ItemBool  *itemRestoreLastState;
  itemRestoreLastState = new Konq::SettingsBase::ItemBool( currentGroup(), QStringLiteral( "RestoreLastState" ), mRestoreLastState, false );
  addItem( itemRestoreLastState, QStringLiteral( "RestoreLastState" ) );

  setCurrentGroup( QStringLiteral( "UndoManagerSettings" ) );

  Konq::SettingsBase::ItemInt  *itemMaxNumClosedItems;
  itemMaxNumClosedItems = new Konq::SettingsBase::ItemInt( currentGroup(), QStringLiteral( "maxNumClosedItems" ), mMaxNumClosedItems, 20 );
  itemMaxNumClosedItems->setMinValue(0);
  addItem( itemMaxNumClosedItems, QStringLiteral( "maxNumClosedItems" ) );

  setCurrentGroup( QStringLiteral( "FMSettings" ) );

  Konq::SettingsBase::ItemBool  *itemAlwaysNewWin;
  itemAlwaysNewWin = new Konq::SettingsBase::ItemBool( currentGroup(), QStringLiteral( "AlwaysNewWin" ), mAlwaysNewWin, false );
  addItem( itemAlwaysNewWin, QStringLiteral( "AlwaysNewWin" ) );
  Konq::SettingsBase::ItemBool  *itemShowFileTips;
  itemShowFileTips = new Konq::SettingsBase::ItemBool( currentGroup(), QStringLiteral( "ShowFileTips" ), mShowFileTips, true );
  addItem( itemShowFileTips, QStringLiteral( "ShowFileTips" ) );
  Konq::SettingsBase::ItemInt  *itemFileTipsItems;
  itemFileTipsItems = new Konq::SettingsBase::ItemInt( currentGroup(), QStringLiteral( "FileTipsItems" ), mFileTipsItems, 6 );
  addItem( itemFileTipsItems, QStringLiteral( "FileTipsItems" ) );
  Konq::SettingsBase::ItemBool  *itemShowPreviewsInFileTips;
  itemShowPreviewsInFileTips = new Konq::SettingsBase::ItemBool( currentGroup(), QStringLiteral( "ShowPreviewsInFileTips" ), mShowPreviewsInFileTips, true );
  addItem( itemShowPreviewsInFileTips, QStringLiteral( "ShowPreviewsInFileTips" ) );
  Konq::SettingsBase::ItemBool  *itemShowDeleteCommand;
  itemShowDeleteCommand = new Konq::SettingsBase::ItemBool( currentGroup(), QStringLiteral( "ShowDeleteCommand" ), mShowDeleteCommand, true );
  addItem( itemShowDeleteCommand, QStringLiteral( "ShowDeleteCommand" ) );
  Konq::SettingsBase::ItemBool  *itemMmbOpensTab;
  itemMmbOpensTab = new Konq::SettingsBase::ItemBool( currentGroup(), QStringLiteral( "MMBOpensTab" ), mMmbOpensTab, true );
  addItem( itemMmbOpensTab, QStringLiteral( "MmbOpensTab" ) );
  Konq::SettingsBase::ItemBool  *itemAlwaysTabbedMode;
  itemAlwaysTabbedMode = new Konq::SettingsBase::ItemBool( currentGroup(), QStringLiteral( "AlwaysTabbedMode" ), mAlwaysTabbedMode, false );
  addItem( itemAlwaysTabbedMode, QStringLiteral( "AlwaysTabbedMode" ) );
  Konq::SettingsBase::ItemBool  *itemNewTabsInFront;
  itemNewTabsInFront = new Konq::SettingsBase::ItemBool( currentGroup(), QStringLiteral( "NewTabsInFront" ), mNewTabsInFront, false );
  addItem( itemNewTabsInFront, QStringLiteral( "NewTabsInFront" ) );
  Konq::SettingsBase::ItemBool  *itemOpenAfterCurrentPage;
  itemOpenAfterCurrentPage = new Konq::SettingsBase::ItemBool( currentGroup(), QStringLiteral( "OpenAfterCurrentPage" ), mOpenAfterCurrentPage, false );
  addItem( itemOpenAfterCurrentPage, QStringLiteral( "OpenAfterCurrentPage" ) );
  Konq::SettingsBase::ItemBool  *itemPermanentCloseButton;
  itemPermanentCloseButton = new Konq::SettingsBase::ItemBool( currentGroup(), QStringLiteral( "PermanentCloseButton" ), mPermanentCloseButton, true );
  addItem( itemPermanentCloseButton, QStringLiteral( "PermanentCloseButton" ) );
  Konq::SettingsBase::ItemBool  *itemKonquerorTabforExternalURL;
  itemKonquerorTabforExternalURL = new Konq::SettingsBase::ItemBool( currentGroup(), QStringLiteral( "KonquerorTabforExternalURL" ), mKonquerorTabforExternalURL, false );
  addItem( itemKonquerorTabforExternalURL, QStringLiteral( "KonquerorTabforExternalURL" ) );
  Konq::SettingsBase::ItemBool  *itemPopupsWithinTabs;
  itemPopupsWithinTabs = new Konq::SettingsBase::ItemBool( currentGroup(), QStringLiteral( "PopupsWithinTabs" ), mPopupsWithinTabs, false );
  addItem( itemPopupsWithinTabs, QStringLiteral( "PopupsWithinTabs" ) );
  Konq::SettingsBase::ItemBool  *itemTabCloseActivatePrevious;
  itemTabCloseActivatePrevious = new Konq::SettingsBase::ItemBool( currentGroup(), QStringLiteral( "TabCloseActivatePrevious" ), mTabCloseActivatePrevious, false );
  addItem( itemTabCloseActivatePrevious, QStringLiteral( "TabCloseActivatePrevious" ) );
  Konq::SettingsBase::ItemBool  *itemMouseMiddleClickClosesTab;
  itemMouseMiddleClickClosesTab = new Konq::SettingsBase::ItemBool( currentGroup(), QStringLiteral( "MouseMiddleClickClosesTab" ), mMouseMiddleClickClosesTab, false );
  addItem( itemMouseMiddleClickClosesTab, QStringLiteral( "MouseMiddleClickClosesTab" ) );
  Konq::SettingsBase::ItemBool  *itemAddTabButton;
  itemAddTabButton = new Konq::SettingsBase::ItemBool( currentGroup(), QStringLiteral( "AddTabButton" ), mAddTabButton, true );
  addItem( itemAddTabButton, QStringLiteral( "AddTabButton" ) );
  Konq::SettingsBase::ItemBool  *itemCloseTabButton;
  itemCloseTabButton = new Konq::SettingsBase::ItemBool( currentGroup(), QStringLiteral( "CloseTabButton" ), mCloseTabButton, true );
  addItem( itemCloseTabButton, QStringLiteral( "CloseTabButton" ) );
  Konq::SettingsBase::ItemInt  *itemMaximumTabLength;
  itemMaximumTabLength = new Konq::SettingsBase::ItemInt( currentGroup(), QStringLiteral( "MaximumTabLength" ), mMaximumTabLength, 30 );
  addItem( itemMaximumTabLength, QStringLiteral( "MaximumTabLength" ) );
  Konq::SettingsBase::ItemInt  *itemMinimumTabLength;
  itemMinimumTabLength = new Konq::SettingsBase::ItemInt( currentGroup(), QStringLiteral( "MinimumTabLength" ), mMinimumTabLength, 3 );
  addItem( itemMinimumTabLength, QStringLiteral( "MinimumTabLength" ) );
  Konq::SettingsBase::ItemInt  *itemTabBarPosition;
  itemTabBarPosition = new Konq::SettingsBase::ItemInt( currentGroup(), QStringLiteral( "TabBarPosition" ), mTabBarPosition, 0 );
  addItem( itemTabBarPosition, QStringLiteral( "TabBarPosition" ) );
  Konq::SettingsBase::ItemInt  *itemOpenWithItems;
  itemOpenWithItems = new Konq::SettingsBase::ItemInt( currentGroup(), QStringLiteral( "OpenWithItems" ), mOpenWithItems, 2 );
  addItem( itemOpenWithItems, QStringLiteral( "OpenWithItems" ) );

  setCurrentGroup( QStringLiteral( "HTML Settings" ) );

  Konq::SettingsBase::ItemFont  *itemStandardFont;
  itemStandardFont = new Konq::SettingsBase::ItemFont( currentGroup(), QStringLiteral( "StandardFont" ), mStandardFont, QFont("Sans Serif") );
  addItem( itemStandardFont, QStringLiteral( "StandardFont" ) );
  Konq::SettingsBase::ItemInt  *itemMediumFontSize;
  itemMediumFontSize = new Konq::SettingsBase::ItemInt( currentGroup(), QStringLiteral( "MediumFontSize" ), mMediumFontSize, 12 );
  addItem( itemMediumFontSize, QStringLiteral( "MediumFontSize" ) );
  Konq::SettingsBase::ItemInt  *itemMinimumFontSize;
  itemMinimumFontSize = new Konq::SettingsBase::ItemInt( currentGroup(), QStringLiteral( "MinimumFontSize" ), mMinimumFontSize, 7 );
  addItem( itemMinimumFontSize, QStringLiteral( "MinimumFontSize" ) );
  Konq::SettingsBase::ItemStringList  *itemFonts;
  itemFonts = new Konq::SettingsBase::ItemStringList( currentGroup(), QStringLiteral( "Fonts" ), mFonts );
  addItem( itemFonts, QStringLiteral( "Fonts" ) );
  Konq::SettingsBase::ItemString  *itemDefaultEncoding;
  itemDefaultEncoding = new Konq::SettingsBase::ItemString( currentGroup(), QStringLiteral( "DefaultEncoding" ), mDefaultEncoding, QString() );
  addItem( itemDefaultEncoding, QStringLiteral( "DefaultEncoding" ) );
  Konq::SettingsBase::ItemBool  *itemHtmlUnderlineLinks;
  itemHtmlUnderlineLinks = new Konq::SettingsBase::ItemBool( currentGroup(), QStringLiteral( "UnderlineLinks" ), mHtmlUnderlineLinks, true );
  addItem( itemHtmlUnderlineLinks, QStringLiteral( "HtmlUnderlineLinks" ) );
  Konq::SettingsBase::ItemBool  *itemHoverLinks;
  itemHoverLinks = new Konq::SettingsBase::ItemBool( currentGroup(), QStringLiteral( "HoverLinks" ), mHoverLinks, false );
  addItem( itemHoverLinks, QStringLiteral( "HoverLinks" ) );
  Konq::SettingsBase::ItemBool  *itemAutoLoadImages;
  itemAutoLoadImages = new Konq::SettingsBase::ItemBool( currentGroup(), QStringLiteral( "AutoLoadImages" ), mAutoLoadImages, true );
  addItem( itemAutoLoadImages, QStringLiteral( "AutoLoadImages" ) );
  Konq::SettingsBase::ItemString  *itemShowAnimations;
  itemShowAnimations = new Konq::SettingsBase::ItemString( currentGroup(), QStringLiteral( "ShowAnimations" ), mShowAnimations );
  addItem( itemShowAnimations, QStringLiteral( "ShowAnimations" ) );
  Konq::SettingsBase::ItemBool  *itemFormCompletion;
  itemFormCompletion = new Konq::SettingsBase::ItemBool( currentGroup(), QStringLiteral( "FormCompletion" ), mFormCompletion, true );
  addItem( itemFormCompletion, QStringLiteral( "FormCompletion" ) );
  Konq::SettingsBase::ItemInt  *itemMaxFormCompletionItems;
  itemMaxFormCompletionItems = new Konq::SettingsBase::ItemInt( currentGroup(), QStringLiteral( "MaxFormCompletionItems" ), mMaxFormCompletionItems, 10 );
  addItem( itemMaxFormCompletionItems, QStringLiteral( "MaxFormCompletionItems" ) );
  Konq::SettingsBase::ItemBool  *itemUseInternalPDFViewer;
  itemUseInternalPDFViewer = new Konq::SettingsBase::ItemBool( currentGroup(), QStringLiteral( "InternalPdfViewer" ), mUseInternalPDFViewer, false );
  addItem( itemUseInternalPDFViewer, QStringLiteral( "useInternalPDFViewer" ) );
  Konq::SettingsBase::ItemBool  *itemAlwaysEmbedInNewTab;
  itemAlwaysEmbedInNewTab = new Konq::SettingsBase::ItemBool( currentGroup(), QStringLiteral( "AlwaysEmbedInNewTab" ), mAlwaysEmbedInNewTab, false );
  addItem( itemAlwaysEmbedInNewTab, QStringLiteral( "AlwaysEmbedInNewTab" ) );
  Konq::SettingsBase::ItemBool  *itemEnableFavicon;
  itemEnableFavicon = new Konq::SettingsBase::ItemBool( currentGroup(), QStringLiteral( "EnableFavicon" ), mEnableFavicon, true );
  addItem( itemEnableFavicon, QStringLiteral( "EnableFavicon" ) );
  Konq::SettingsBase::ItemInt  *itemAutomaticDetectionLanguage;
  itemAutomaticDetectionLanguage = new Konq::SettingsBase::ItemInt( currentGroup(), QStringLiteral( "AutomaticDetectionLanguage" ), mAutomaticDetectionLanguage );
  addItem( itemAutomaticDetectionLanguage, QStringLiteral( "AutomaticDetectionLanguage" ) );
  Konq::SettingsBase::ItemBool  *itemEnforceDefaultCharset;
  itemEnforceDefaultCharset = new Konq::SettingsBase::ItemBool( currentGroup(), QStringLiteral( "EnforceDefaultCharset" ), mEnforceDefaultCharset );
  addItem( itemEnforceDefaultCharset, QStringLiteral( "EnforceDefaultCharset" ) );
  Konq::SettingsBase::ItemBool  *itemUserStyleSheetEnabled;
  itemUserStyleSheetEnabled = new Konq::SettingsBase::ItemBool( currentGroup(), QStringLiteral( "UserStyleSheetEnabled" ), mUserStyleSheetEnabled );
  addItem( itemUserStyleSheetEnabled, QStringLiteral( "UserStyleSheetEnabled" ) );

  setCurrentGroup( QStringLiteral( "MainView Settings" ) );

  Konq::SettingsBase::ItemBool  *itemOpenMiddleClick;
  itemOpenMiddleClick = new Konq::SettingsBase::ItemBool( currentGroup(), QStringLiteral( "OpenMiddleClick" ), mOpenMiddleClick, true );
  addItem( itemOpenMiddleClick, QStringLiteral( "OpenMiddleClick" ) );
  Konq::SettingsBase::ItemBool  *itemBackRightClick;
  itemBackRightClick = new Konq::SettingsBase::ItemBool( currentGroup(), QStringLiteral( "BackRightClick" ), mBackRightClick, false );
  addItem( itemBackRightClick, QStringLiteral( "BackRightClick" ) );
  Konq::SettingsBase::ItemBool  *itemOfferToSaveWebsitePassword;
  itemOfferToSaveWebsitePassword = new Konq::SettingsBase::ItemBool( currentGroup(), QStringLiteral( "OfferToSaveWebsitePassword" ), mOfferToSaveWebsitePassword, true );
  addItem( itemOfferToSaveWebsitePassword, QStringLiteral( "OfferToSaveWebsitePassword" ) );
  Konq::SettingsBase::ItemStringList  *itemToggableViewsShown;
  itemToggableViewsShown = new Konq::SettingsBase::ItemStringList( currentGroup(), QStringLiteral( "ToggableViewsShown" ), mToggableViewsShown );
  addItem( itemToggableViewsShown, QStringLiteral( "ToggableViewsShown" ) );

  setCurrentGroup( QStringLiteral( "HistorySettings" ) );

  Konq::SettingsBase::ItemString  *itemOpenGroups;
  itemOpenGroups = new Konq::SettingsBase::ItemString( currentGroup(), QStringLiteral( "OpenGroups" ), mOpenGroups );
  addItem( itemOpenGroups, QStringLiteral( "OpenGroups" ) );
  Konq::SettingsBase::ItemInt  *itemMaximumHistoryEntriesPerView;
  itemMaximumHistoryEntriesPerView = new Konq::SettingsBase::ItemInt( currentGroup(), QStringLiteral( "MaximumHistoryEntriesPerView" ), mMaximumHistoryEntriesPerView, 50 );
  addItem( itemMaximumHistoryEntriesPerView, QStringLiteral( "MaximumHistoryEntriesPerView" ) );
  Konq::SettingsBase::ItemInt  *itemDefaultAction;
  itemDefaultAction = new Konq::SettingsBase::ItemInt( currentGroup(), QStringLiteral( "Default Action" ), mDefaultAction, 0 );
  addItem( itemDefaultAction, QStringLiteral( "defaultAction" ) );
  Konq::SettingsBase::ItemInt  *itemMaximumHistoryEntryAge;
  itemMaximumHistoryEntryAge = new Konq::SettingsBase::ItemInt( currentGroup(), QStringLiteral( "Maximum age of History entries" ), mMaximumHistoryEntryAge, 90 );
  addItem( itemMaximumHistoryEntryAge, QStringLiteral( "maximumHistoryEntryAge" ) );

  setCurrentGroup( QStringLiteral( "Java/JavaScript Settings" ) );

  Konq::SettingsBase::ItemStringList  *itemEcmaDomains;
  itemEcmaDomains = new Konq::SettingsBase::ItemStringList( currentGroup(), QStringLiteral( "ECMADomains" ), mEcmaDomains );
  addItem( itemEcmaDomains, QStringLiteral( "ecmaDomains" ) );
  Konq::SettingsBase::ItemStringList  *itemECMADomainSettings;
  itemECMADomainSettings = new Konq::SettingsBase::ItemStringList( currentGroup(), QStringLiteral( "ECMADomainSettings" ), mECMADomainSettings );
  addItem( itemECMADomainSettings, QStringLiteral( "ECMADomainSettings" ) );
  Konq::SettingsBase::ItemBool  *itemEnableJavaScript;
  itemEnableJavaScript = new Konq::SettingsBase::ItemBool( currentGroup(), QStringLiteral( "EnableJavaScript" ), mEnableJavaScript );
  addItem( itemEnableJavaScript, QStringLiteral( "EnableJavaScript" ) );
  Konq::SettingsBase::ItemUInt  *itemWindowOpenPolicy;
  itemWindowOpenPolicy = new Konq::SettingsBase::ItemUInt( currentGroup(), QStringLiteral( "WindowOpenPolicy" ), mWindowOpenPolicy );
  addItem( itemWindowOpenPolicy, QStringLiteral( "WindowOpenPolicy" ) );
  Konq::SettingsBase::ItemUInt  *itemWindowResizePolicy;
  itemWindowResizePolicy = new Konq::SettingsBase::ItemUInt( currentGroup(), QStringLiteral( "WindowResizePolicy" ), mWindowResizePolicy );
  addItem( itemWindowResizePolicy, QStringLiteral( "WindowResizePolicy" ) );
  Konq::SettingsBase::ItemUInt  *itemWindowMovePolicy;
  itemWindowMovePolicy = new Konq::SettingsBase::ItemUInt( currentGroup(), QStringLiteral( "WindowMovePolicy" ), mWindowMovePolicy );
  addItem( itemWindowMovePolicy, QStringLiteral( "WindowMovePolicy" ) );
  Konq::SettingsBase::ItemUInt  *itemWindowFocusPolicy;
  itemWindowFocusPolicy = new Konq::SettingsBase::ItemUInt( currentGroup(), QStringLiteral( "WindowFocusPolicy" ), mWindowFocusPolicy );
  addItem( itemWindowFocusPolicy, QStringLiteral( "WindowFocusPolicy" ) );
  Konq::SettingsBase::ItemUInt  *itemWindowStatusPolicy;
  itemWindowStatusPolicy = new Konq::SettingsBase::ItemUInt( currentGroup(), QStringLiteral( "WindowStatusPolicy" ), mWindowStatusPolicy );
  addItem( itemWindowStatusPolicy, QStringLiteral( "WindowStatusPolicy" ) );
  Konq::SettingsBase::ItemBool  *itemEnablePlugins;
  itemEnablePlugins = new Konq::SettingsBase::ItemBool( currentGroup(), QStringLiteral( "EnablePlugins" ), mEnablePlugins, true );
  addItem( itemEnablePlugins, QStringLiteral( "EnablePlugins" ) );
  Konq::SettingsBase::ItemStringList  *itemPluginDomains;
  itemPluginDomains = new Konq::SettingsBase::ItemStringList( currentGroup(), QStringLiteral( "PluginDomains" ), mPluginDomains );
  addItem( itemPluginDomains, QStringLiteral( "PluginDomains" ) );

  setCurrentGroup( QStringLiteral( "Notification Messages" ) );

  Konq::SettingsBase::ItemBool  *itemMultipleTabConfirm;
  itemMultipleTabConfirm = new Konq::SettingsBase::ItemBool( currentGroup(), QStringLiteral( "MultipleTabConfirm" ), mMultipleTabConfirm, false );
  addItem( itemMultipleTabConfirm, QStringLiteral( "MultipleTabConfirm" ) );
  Konq::SettingsBase::ItemString  *itemPlugin_application_x_shockwave_flash;
  itemPlugin_application_x_shockwave_flash = new Konq::SettingsBase::ItemString( currentGroup(), QStringLiteral( "plugin-application/x-shockwave-flash" ), mPlugin_application_x_shockwave_flash );
  addItem( itemPlugin_application_x_shockwave_flash, QStringLiteral( "plugin_application_x_shockwave_flash" ) );
  Konq::SettingsBase::ItemString  *itemPlugin_image_svg_xml;
  itemPlugin_image_svg_xml = new Konq::SettingsBase::ItemString( currentGroup(), QStringLiteral( "plugin-image/svg+xml" ), mPlugin_image_svg_xml );
  addItem( itemPlugin_image_svg_xml, QStringLiteral( "plugin_image_svg_xml" ) );

  setCurrentGroup( QStringLiteral( "Reusing" ) );

  Konq::SettingsBase::ItemBool  *itemAlwaysHavePreloaded;
  itemAlwaysHavePreloaded = new Konq::SettingsBase::ItemBool( currentGroup(), QStringLiteral( "AlwaysHavePreloaded" ), mAlwaysHavePreloaded, true );
  addItem( itemAlwaysHavePreloaded, QStringLiteral( "AlwaysHavePreloaded" ) );
  Konq::SettingsBase::ItemBool  *itemPreloadOnStartup;
  itemPreloadOnStartup = new Konq::SettingsBase::ItemBool( currentGroup(), QStringLiteral( "PreloadOnStartup" ), mPreloadOnStartup, false );
  addItem( itemPreloadOnStartup, QStringLiteral( "PreloadOnStartup" ) );

  setCurrentGroup( QStringLiteral( "Settings" ) );

  Konq::SettingsBase::ItemString  *itemBgImage;
  itemBgImage = new Konq::SettingsBase::ItemString( currentGroup(), QStringLiteral( "BgImage" ), mBgImage );
  addItem( itemBgImage, QStringLiteral( "BgImage" ) );
  Konq::SettingsBase::ItemBool  *itemSaveURLInProfile;
  itemSaveURLInProfile = new Konq::SettingsBase::ItemBool( currentGroup(), QStringLiteral( "SaveURLInProfile" ), mSaveURLInProfile, true );
  addItem( itemSaveURLInProfile, QStringLiteral( "SaveURLInProfile" ) );
  QList<Konq::SettingsBase::ItemEnum::Choice> valuesSettingsCompletionMode;
  Konq::SettingsBase::ItemEnum  *itemSettingsCompletionMode;
  itemSettingsCompletionMode = new Konq::SettingsBase::ItemEnum( currentGroup(), QStringLiteral( "CompletionMode" ), mSettingsCompletionMode, valuesSettingsCompletionMode, KCompletion::CompletionPopup );
  addItem( itemSettingsCompletionMode, QStringLiteral( "SettingsCompletionMode" ) );
  Konq::SettingsBase::ItemInt  *itemNumberofmostvisitedURLs;
  itemNumberofmostvisitedURLs = new Konq::SettingsBase::ItemInt( currentGroup(), QStringLiteral( "Number of most visited URLs" ), mNumberofmostvisitedURLs, 10 );
  addItem( itemNumberofmostvisitedURLs, QStringLiteral( "NumberofmostvisitedURLs" ) );

  setCurrentGroup( QStringLiteral( "Trash" ) );

  Konq::SettingsBase::ItemBool  *itemConfirmDelete;
  itemConfirmDelete = new Konq::SettingsBase::ItemBool( currentGroup(), QStringLiteral( "ConfirmDelete" ), mConfirmDelete, true );
  addItem( itemConfirmDelete, QStringLiteral( "ConfirmDelete" ) );
  Konq::SettingsBase::ItemBool  *itemConfirmTrash;
  itemConfirmTrash = new Konq::SettingsBase::ItemBool( currentGroup(), QStringLiteral( "ConfirmTrash" ), mConfirmTrash, true );
  addItem( itemConfirmTrash, QStringLiteral( "ConfirmTrash" ) );
  Konq::SettingsBase::ItemBool  *itemOpenTabsInsideCurrentWindow;
  itemOpenTabsInsideCurrentWindow = new Konq::SettingsBase::ItemBool( currentGroup(), QStringLiteral( "OpenTabsInsideCurrentWindow" ), mOpenTabsInsideCurrentWindow, false );
  addItem( itemOpenTabsInsideCurrentWindow, QStringLiteral( "OpenTabsInsideCurrentWindow" ) );

  setCurrentGroup( QStringLiteral( "SessionManagerSettings" ) );

  Konq::SettingsBase::ItemInt  *itemAutoSaveInterval;
  itemAutoSaveInterval = new Konq::SettingsBase::ItemInt( currentGroup(), QStringLiteral( "AutoSaveInterval" ), mAutoSaveInterval, 10 );
  addItem( itemAutoSaveInterval, QStringLiteral( "AutoSaveInterval" ) );

  setCurrentGroup( QStringLiteral( "Cache" ) );

  Konq::SettingsBase::ItemBool  *itemCacheEnabled;
  itemCacheEnabled = new Konq::SettingsBase::ItemBool( currentGroup(), QStringLiteral( "CacheEnabled" ), mCacheEnabled, true );
  addItem( itemCacheEnabled, QStringLiteral( "CacheEnabled" ) );
  Konq::SettingsBase::ItemBool  *itemKeepCacheInMemory;
  itemKeepCacheInMemory = new Konq::SettingsBase::ItemBool( currentGroup(), QStringLiteral( "MemoryCache" ), mKeepCacheInMemory, false );
  addItem( itemKeepCacheInMemory, QStringLiteral( "KeepCacheInMemory" ) );
  Konq::SettingsBase::ItemInt  *itemMaximumCacheSize;
  itemMaximumCacheSize = new Konq::SettingsBase::ItemInt( currentGroup(), QStringLiteral( "MaximumCacheSize" ), mMaximumCacheSize, 0 );
  addItem( itemMaximumCacheSize, QStringLiteral( "MaximumCacheSize" ) );
  Konq::SettingsBase::ItemPath  *itemCustomCacheDir;
  itemCustomCacheDir = new Konq::SettingsBase::ItemPath( currentGroup(), QStringLiteral( "CustomCacheDir" ), mCustomCacheDir );
  addItem( itemCustomCacheDir, QStringLiteral( "CustomCacheDir" ) );

  setCurrentGroup( QStringLiteral( "UserAgent" ) );

  Konq::SettingsBase::ItemBool  *itemUseDefaultUserAgent;
  itemUseDefaultUserAgent = new Konq::SettingsBase::ItemBool( currentGroup(), QStringLiteral( "UseDefaultUserAgent" ), mUseDefaultUserAgent, true );
  addItem( itemUseDefaultUserAgent, QStringLiteral( "UseDefaultUserAgent" ) );
  Konq::SettingsBase::ItemString  *itemCustomUserAgent;
  itemCustomUserAgent = new Konq::SettingsBase::ItemString( currentGroup(), QStringLiteral( "CustomUserAgent" ), mCustomUserAgent );
  addItem( itemCustomUserAgent, QStringLiteral( "CustomUserAgent" ) );

  setCurrentGroup( QStringLiteral( "Cookie Policy" ) );

  Konq::SettingsBase::ItemBool  *itemCookiesEnabled;
  itemCookiesEnabled = new Konq::SettingsBase::ItemBool( currentGroup(), QStringLiteral( "Cookies" ), mCookiesEnabled, true );
  addItem( itemCookiesEnabled, QStringLiteral( "cookiesEnabled" ) );
  Konq::SettingsBase::ItemBool  *itemRejectCrossDomainCookies;
  itemRejectCrossDomainCookies = new Konq::SettingsBase::ItemBool( currentGroup(), QStringLiteral( "RejectCrossDomainCookies" ), mRejectCrossDomainCookies, true );
  addItem( itemRejectCrossDomainCookies, QStringLiteral( "RejectCrossDomainCookies" ) );
  Konq::SettingsBase::ItemBool  *itemAcceptSessionCookies;
  itemAcceptSessionCookies = new Konq::SettingsBase::ItemBool( currentGroup(), QStringLiteral( "AcceptSessionCookies" ), mAcceptSessionCookies, true );
  addItem( itemAcceptSessionCookies, QStringLiteral( "AcceptSessionCookies" ) );
  Konq::SettingsBase::ItemInt  *itemCookieGlobalAdviceRaw;
  itemCookieGlobalAdviceRaw = new Konq::SettingsBase::ItemInt( currentGroup(), QStringLiteral( "CookieGlobalAdvice" ), mCookieGlobalAdviceRaw, 0 );
  addItem( itemCookieGlobalAdviceRaw, QStringLiteral( "CookieGlobalAdviceRaw" ) );
  Konq::SettingsBase::ItemString  *itemCookieDomainAdviceRaw;
  itemCookieDomainAdviceRaw = new Konq::SettingsBase::ItemString( currentGroup(), QStringLiteral( "CookieDomainAdvice" ), mCookieDomainAdviceRaw );
  addItem( itemCookieDomainAdviceRaw, QStringLiteral( "CookieDomainAdviceRaw" ) );

  setCurrentGroup( QStringLiteral( "SpeedDial" ) );

  Konq::SettingsBase::ItemInt  *itemEntriesCount;
  itemEntriesCount = new Konq::SettingsBase::ItemInt( currentGroup(), QStringLiteral( "EntriesCount" ), mEntriesCount, 0 );
  addItem( itemEntriesCount, QStringLiteral( "EntriesCount" ) );

  setCurrentGroup( QStringLiteral( "DisableWindowOpenFeatures" ) );

  Konq::SettingsBase::ItemBool  *itemLocationBarInJsWindows;
  itemLocationBarInJsWindows = new Konq::SettingsBase::ItemBool( currentGroup(), QStringLiteral( "LocationBar" ), mLocationBarInJsWindows, true );
  addItem( itemLocationBarInJsWindows, QStringLiteral( "locationBarInJsWindows" ) );
}

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

