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

#include "config.h"

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

#include <QDebug>

class ConfigHelper
{
  public:
    ConfigHelper() : q(nullptr) {}
    ~ConfigHelper() { delete q; q = nullptr; }
    ConfigHelper(const ConfigHelper&) = delete;
    ConfigHelper& operator=(const ConfigHelper&) = delete;
    Config *q;
};
Q_GLOBAL_STATIC(ConfigHelper, s_globalConfig)
Config *Config::self()
{
  if (!s_globalConfig()->q)
     qFatal("you need to call Config::instance before using");
  return s_globalConfig()->q;
}

void Config::instance(const QString& cfgfilename)
{
  if (s_globalConfig()->q) {
     qDebug() << "Config::instance called after the first use - ignoring";
     return;
  }
  new Config(KSharedConfig::openConfig(cfgfilename));
  s_globalConfig()->q->read();
}

void Config::instance(KSharedConfig::Ptr config)
{
  if (s_globalConfig()->q) {
     qDebug() << "Config::instance called after the first use - ignoring";
     return;
  }
  new Config(std::move(config));
  s_globalConfig()->q->read();
}

const char* const Config::EnumFileSystem::enumToString[] = { "Unknown", "Extended", "Ext2", "Ext3", "Ext4", "LinuxSwap", "Fat16", "Fat32", "Ntfs", "ReiserFS", "Reiser4", "Xfs", "Jfs", "Hfs", "HfsPlus", "Ufs", "Unformatted", "Btrfs", "Hpfs", "Luks", "Ocfs2", "Zfs", "Exfat", "Nilfs2", "Lvm2_PV", "F2fs", "Udf", "Iso9660", "Luks2", "Fat12", "LinuxRaidMember", "BitLocker", "Apfs", "Minix" };

Config::Config( KSharedConfig::Ptr config )
  : KConfigSkeleton( std::move( config ) )
{
  Q_ASSERT(!s_globalConfig()->q);
  s_globalConfig()->q = this;
  setCurrentGroup( QStringLiteral( "KDE Partition Manager" ) );

  QList<int> defaulttreePartitionColumnWidths;
  defaulttreePartitionColumnWidths.append( 140 );
  defaulttreePartitionColumnWidths.append( 150 );
  defaulttreePartitionColumnWidths.append( 120 );
  defaulttreePartitionColumnWidths.append( 80 );
  defaulttreePartitionColumnWidths.append( 0 );
  defaulttreePartitionColumnWidths.append( 110 );
  defaulttreePartitionColumnWidths.append( 0 );
  defaulttreePartitionColumnWidths.append( 90 );
  defaulttreePartitionColumnWidths.append( 90 );
  defaulttreePartitionColumnWidths.append( 0 );
  defaulttreePartitionColumnWidths.append( 0 );
  defaulttreePartitionColumnWidths.append( 0 );
  defaulttreePartitionColumnWidths.append( 0 );
  defaulttreePartitionColumnWidths.append( 0 );

  mTreePartitionColumnWidthsItem = new KConfigSkeleton::ItemIntList( currentGroup(), QStringLiteral( "treePartitionColumnWidths" ), mTreePartitionColumnWidths, defaulttreePartitionColumnWidths );
  mTreePartitionColumnWidthsItem->setLabel( QCoreApplication::translate("Config", "treePartitionColumnWidths") );
  addItem( mTreePartitionColumnWidthsItem, QStringLiteral( "treePartitionColumnWidths" ) );
  QList<int> defaulttreePartitionColumnPositions;
  defaulttreePartitionColumnPositions.append( 0 );
  defaulttreePartitionColumnPositions.append( 1 );
  defaulttreePartitionColumnPositions.append( 2 );
  defaulttreePartitionColumnPositions.append( 3 );
  defaulttreePartitionColumnPositions.append( 4 );
  defaulttreePartitionColumnPositions.append( 5 );
  defaulttreePartitionColumnPositions.append( 6 );
  defaulttreePartitionColumnPositions.append( 7 );
  defaulttreePartitionColumnPositions.append( 8 );
  defaulttreePartitionColumnPositions.append( 9 );
  defaulttreePartitionColumnPositions.append( 10 );
  defaulttreePartitionColumnPositions.append( 11 );
  defaulttreePartitionColumnPositions.append( 12 );
  defaulttreePartitionColumnPositions.append( 13 );

  mTreePartitionColumnPositionsItem = new KConfigSkeleton::ItemIntList( currentGroup(), QStringLiteral( "treePartitionColumnPositions" ), mTreePartitionColumnPositions, defaulttreePartitionColumnPositions );
  mTreePartitionColumnPositionsItem->setLabel( QCoreApplication::translate("Config", "treePartitionColumnPositions") );
  addItem( mTreePartitionColumnPositionsItem, QStringLiteral( "treePartitionColumnPositions" ) );
  QList<int> defaulttreePartitionColumnVisible;
  defaulttreePartitionColumnVisible.append( 1 );
  defaulttreePartitionColumnVisible.append( 1 );
  defaulttreePartitionColumnVisible.append( 1 );
  defaulttreePartitionColumnVisible.append( 1 );
  defaulttreePartitionColumnVisible.append( 0 );
  defaulttreePartitionColumnVisible.append( 1 );
  defaulttreePartitionColumnVisible.append( 0 );
  defaulttreePartitionColumnVisible.append( 1 );
  defaulttreePartitionColumnVisible.append( 1 );
  defaulttreePartitionColumnVisible.append( 0 );
  defaulttreePartitionColumnVisible.append( 0 );
  defaulttreePartitionColumnVisible.append( 0 );
  defaulttreePartitionColumnVisible.append( 0 );
  defaulttreePartitionColumnVisible.append( 0 );

  mTreePartitionColumnVisibleItem = new KConfigSkeleton::ItemIntList( currentGroup(), QStringLiteral( "treePartitionColumnVisible" ), mTreePartitionColumnVisible, defaulttreePartitionColumnVisible );
  mTreePartitionColumnVisibleItem->setLabel( QCoreApplication::translate("Config", "treePartitionColumnVisible") );
  addItem( mTreePartitionColumnVisibleItem, QStringLiteral( "treePartitionColumnVisible" ) );
  QList<int> defaulttreeLogColumnWidths;
  defaulttreeLogColumnWidths.append( 32 );
  defaulttreeLogColumnWidths.append( 192 );
  defaulttreeLogColumnWidths.append( 800 );

  mTreeLogColumnWidthsItem = new KConfigSkeleton::ItemIntList( currentGroup(), QStringLiteral( "treeLogColumnWidths" ), mTreeLogColumnWidths, defaulttreeLogColumnWidths );
  mTreeLogColumnWidthsItem->setLabel( QCoreApplication::translate("Config", "treeLogColumnWidths") );
  addItem( mTreeLogColumnWidthsItem, QStringLiteral( "treeLogColumnWidths" ) );
  QList<int> defaulttreeLogColumnPositions;
  defaulttreeLogColumnPositions.append( 0 );
  defaulttreeLogColumnPositions.append( 1 );
  defaulttreeLogColumnPositions.append( 2 );

  mTreeLogColumnPositionsItem = new KConfigSkeleton::ItemIntList( currentGroup(), QStringLiteral( "treeLogColumnPositions" ), mTreeLogColumnPositions, defaulttreeLogColumnPositions );
  mTreeLogColumnPositionsItem->setLabel( QCoreApplication::translate("Config", "treeLogColumnPositions") );
  addItem( mTreeLogColumnPositionsItem, QStringLiteral( "treeLogColumnPositions" ) );
  QList<int> defaulttreeLogColumnVisible;
  defaulttreeLogColumnVisible.append( 1 );
  defaulttreeLogColumnVisible.append( 1 );
  defaulttreeLogColumnVisible.append( 1 );

  mTreeLogColumnVisibleItem = new KConfigSkeleton::ItemIntList( currentGroup(), QStringLiteral( "treeLogColumnVisible" ), mTreeLogColumnVisible, defaulttreeLogColumnVisible );
  mTreeLogColumnVisibleItem->setLabel( QCoreApplication::translate("Config", "treeLogColumnVisible") );
  addItem( mTreeLogColumnVisibleItem, QStringLiteral( "treeLogColumnVisible" ) );
  QList<int> defaulttreeSmartAttributesColumnWidths;
  defaulttreeSmartAttributesColumnWidths.append( 32 );
  defaulttreeSmartAttributesColumnWidths.append( 430 );
  defaulttreeSmartAttributesColumnWidths.append( 96 );
  defaulttreeSmartAttributesColumnWidths.append( 96 );
  defaulttreeSmartAttributesColumnWidths.append( 64 );
  defaulttreeSmartAttributesColumnWidths.append( 64 );
  defaulttreeSmartAttributesColumnWidths.append( 64 );
  defaulttreeSmartAttributesColumnWidths.append( 96 );
  defaulttreeSmartAttributesColumnWidths.append( 96 );
  defaulttreeSmartAttributesColumnWidths.append( 96 );

  mTreeSmartAttributesColumnWidthsItem = new KConfigSkeleton::ItemIntList( currentGroup(), QStringLiteral( "treeSmartAttributesColumnWidths" ), mTreeSmartAttributesColumnWidths, defaulttreeSmartAttributesColumnWidths );
  mTreeSmartAttributesColumnWidthsItem->setLabel( QCoreApplication::translate("Config", "treeSmartAttributesColumnWidths") );
  addItem( mTreeSmartAttributesColumnWidthsItem, QStringLiteral( "treeSmartAttributesColumnWidths" ) );
  QList<int> defaulttreeSmartAttributesColumnPositions;
  defaulttreeSmartAttributesColumnPositions.append( 0 );
  defaulttreeSmartAttributesColumnPositions.append( 1 );
  defaulttreeSmartAttributesColumnPositions.append( 2 );
  defaulttreeSmartAttributesColumnPositions.append( 3 );
  defaulttreeSmartAttributesColumnPositions.append( 4 );
  defaulttreeSmartAttributesColumnPositions.append( 5 );
  defaulttreeSmartAttributesColumnPositions.append( 6 );
  defaulttreeSmartAttributesColumnPositions.append( 7 );
  defaulttreeSmartAttributesColumnPositions.append( 8 );
  defaulttreeSmartAttributesColumnPositions.append( 9 );

  mTreeSmartAttributesColumnPositionsItem = new KConfigSkeleton::ItemIntList( currentGroup(), QStringLiteral( "treeSmartAttributesColumnPositions" ), mTreeSmartAttributesColumnPositions, defaulttreeSmartAttributesColumnPositions );
  mTreeSmartAttributesColumnPositionsItem->setLabel( QCoreApplication::translate("Config", "treeSmartAttributesColumnPositions") );
  addItem( mTreeSmartAttributesColumnPositionsItem, QStringLiteral( "treeSmartAttributesColumnPositions" ) );
  QList<int> defaulttreeSmartAttributesColumnVisible;
  defaulttreeSmartAttributesColumnVisible.append( 1 );
  defaulttreeSmartAttributesColumnVisible.append( 1 );
  defaulttreeSmartAttributesColumnVisible.append( 0 );
  defaulttreeSmartAttributesColumnVisible.append( 0 );
  defaulttreeSmartAttributesColumnVisible.append( 0 );
  defaulttreeSmartAttributesColumnVisible.append( 0 );
  defaulttreeSmartAttributesColumnVisible.append( 0 );
  defaulttreeSmartAttributesColumnVisible.append( 0 );
  defaulttreeSmartAttributesColumnVisible.append( 1 );
  defaulttreeSmartAttributesColumnVisible.append( 1 );

  mTreeSmartAttributesColumnVisibleItem = new KConfigSkeleton::ItemIntList( currentGroup(), QStringLiteral( "treeSmartAttributesColumnVisible" ), mTreeSmartAttributesColumnVisible, defaulttreeSmartAttributesColumnVisible );
  mTreeSmartAttributesColumnVisibleItem->setLabel( QCoreApplication::translate("Config", "treeSmartAttributesColumnVisible") );
  addItem( mTreeSmartAttributesColumnVisibleItem, QStringLiteral( "treeSmartAttributesColumnVisible" ) );
  mFirstRunItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "firstRun" ), mFirstRun, true );
  mFirstRunItem->setLabel( /*: @label */ QCoreApplication::translate("Config", "Is this the first time KDE Partition Manager is being run?") );
  addItem( mFirstRunItem, QStringLiteral( "firstRun" ) );
  mMinLogLevelItem = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "minLogLevel" ), mMinLogLevel, 0 );
  mMinLogLevelItem->setLabel( /*: @label */ QCoreApplication::translate("Config", "Hide log messages below") );
  addItem( mMinLogLevelItem, QStringLiteral( "minLogLevel" ) );
  mSectorAlignmentItem = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "sectorAlignment" ), mSectorAlignment, 2048 );
  mSectorAlignmentItem->setLabel( /*: @label */ QCoreApplication::translate("Config", "Partition sector alignment") );
  addItem( mSectorAlignmentItem, QStringLiteral( "sectorAlignment" ) );
  mUseCylinderAlignmentItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "useCylinderAlignment" ), mUseCylinderAlignment, false );
  mUseCylinderAlignmentItem->setLabel( /*: @label */ QCoreApplication::translate("Config", "Use cylinder based alignment (Windows XP compatible)") );
  addItem( mUseCylinderAlignmentItem, QStringLiteral( "useCylinderAlignment" ) );
  mAlignDefaultItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "alignDefault" ), mAlignDefault, true );
  mAlignDefaultItem->setLabel( /*: @label */ QCoreApplication::translate("Config", "Align partitions per default") );
  addItem( mAlignDefaultItem, QStringLiteral( "alignDefault" ) );
  mFileSystemColorCodeItem[0] = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "fileSystemColorCodeUnknown" ), mFileSystemColorCode[0], QColor( 220,205,175 ) );
  mFileSystemColorCodeItem[0]->setLabel( /*: @label */ QCoreApplication::translate("Config", "File system colors") );
  addItem( mFileSystemColorCodeItem[0], QStringLiteral( "fileSystemColorCodeUnknown" ) );
  mFileSystemColorCodeItem[1] = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "fileSystemColorCodeExtended" ), mFileSystemColorCode[1], QColor( 187,249,207 ) );
  mFileSystemColorCodeItem[1]->setLabel( /*: @label */ QCoreApplication::translate("Config", "File system colors") );
  addItem( mFileSystemColorCodeItem[1], QStringLiteral( "fileSystemColorCodeExtended" ) );
  mFileSystemColorCodeItem[2] = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "fileSystemColorCodeExt2" ), mFileSystemColorCode[2], QColor( 102,121,150 ) );
  mFileSystemColorCodeItem[2]->setLabel( /*: @label */ QCoreApplication::translate("Config", "File system colors") );
  addItem( mFileSystemColorCodeItem[2], QStringLiteral( "fileSystemColorCodeExt2" ) );
  mFileSystemColorCodeItem[3] = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "fileSystemColorCodeExt3" ), mFileSystemColorCode[3], QColor( 122,145,180 ) );
  mFileSystemColorCodeItem[3]->setLabel( /*: @label */ QCoreApplication::translate("Config", "File system colors") );
  addItem( mFileSystemColorCodeItem[3], QStringLiteral( "fileSystemColorCodeExt3" ) );
  mFileSystemColorCodeItem[4] = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "fileSystemColorCodeExt4" ), mFileSystemColorCode[4], QColor( 143,170,210 ) );
  mFileSystemColorCodeItem[4]->setLabel( /*: @label */ QCoreApplication::translate("Config", "File system colors") );
  addItem( mFileSystemColorCodeItem[4], QStringLiteral( "fileSystemColorCodeExt4" ) );
  mFileSystemColorCodeItem[5] = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "fileSystemColorCodeLinuxSwap" ), mFileSystemColorCode[5], QColor( 155,155,130 ) );
  mFileSystemColorCodeItem[5]->setLabel( /*: @label */ QCoreApplication::translate("Config", "File system colors") );
  addItem( mFileSystemColorCodeItem[5], QStringLiteral( "fileSystemColorCodeLinuxSwap" ) );
  mFileSystemColorCodeItem[6] = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "fileSystemColorCodeFat16" ), mFileSystemColorCode[6], QColor( 204,179,215 ) );
  mFileSystemColorCodeItem[6]->setLabel( /*: @label */ QCoreApplication::translate("Config", "File system colors") );
  addItem( mFileSystemColorCodeItem[6], QStringLiteral( "fileSystemColorCodeFat16" ) );
  mFileSystemColorCodeItem[7] = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "fileSystemColorCodeFat32" ), mFileSystemColorCode[7], QColor( 229,201,240 ) );
  mFileSystemColorCodeItem[7]->setLabel( /*: @label */ QCoreApplication::translate("Config", "File system colors") );
  addItem( mFileSystemColorCodeItem[7], QStringLiteral( "fileSystemColorCodeFat32" ) );
  mFileSystemColorCodeItem[8] = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "fileSystemColorCodeNtfs" ), mFileSystemColorCode[8], QColor( 244,214,255 ) );
  mFileSystemColorCodeItem[8]->setLabel( /*: @label */ QCoreApplication::translate("Config", "File system colors") );
  addItem( mFileSystemColorCodeItem[8], QStringLiteral( "fileSystemColorCodeNtfs" ) );
  mFileSystemColorCodeItem[9] = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "fileSystemColorCodeReiserFS" ), mFileSystemColorCode[9], QColor( 216,220,135 ) );
  mFileSystemColorCodeItem[9]->setLabel( /*: @label */ QCoreApplication::translate("Config", "File system colors") );
  addItem( mFileSystemColorCodeItem[9], QStringLiteral( "fileSystemColorCodeReiserFS" ) );
  mFileSystemColorCodeItem[10] = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "fileSystemColorCodeReiser4" ), mFileSystemColorCode[10], QColor( 251,255,157 ) );
  mFileSystemColorCodeItem[10]->setLabel( /*: @label */ QCoreApplication::translate("Config", "File system colors") );
  addItem( mFileSystemColorCodeItem[10], QStringLiteral( "fileSystemColorCodeReiser4" ) );
  mFileSystemColorCodeItem[11] = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "fileSystemColorCodeXfs" ), mFileSystemColorCode[11], QColor( 200,255,254 ) );
  mFileSystemColorCodeItem[11]->setLabel( /*: @label */ QCoreApplication::translate("Config", "File system colors") );
  addItem( mFileSystemColorCodeItem[11], QStringLiteral( "fileSystemColorCodeXfs" ) );
  mFileSystemColorCodeItem[12] = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "fileSystemColorCodeJfs" ), mFileSystemColorCode[12], QColor( 137,200,198 ) );
  mFileSystemColorCodeItem[12]->setLabel( /*: @label */ QCoreApplication::translate("Config", "File system colors") );
  addItem( mFileSystemColorCodeItem[12], QStringLiteral( "fileSystemColorCodeJfs" ) );
  mFileSystemColorCodeItem[13] = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "fileSystemColorCodeHfs" ), mFileSystemColorCode[13], QColor( 210,136,142 ) );
  mFileSystemColorCodeItem[13]->setLabel( /*: @label */ QCoreApplication::translate("Config", "File system colors") );
  addItem( mFileSystemColorCodeItem[13], QStringLiteral( "fileSystemColorCodeHfs" ) );
  mFileSystemColorCodeItem[14] = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "fileSystemColorCodeHfsPlus" ), mFileSystemColorCode[14], QColor( 240,165,171 ) );
  mFileSystemColorCodeItem[14]->setLabel( /*: @label */ QCoreApplication::translate("Config", "File system colors") );
  addItem( mFileSystemColorCodeItem[14], QStringLiteral( "fileSystemColorCodeHfsPlus" ) );
  mFileSystemColorCodeItem[15] = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "fileSystemColorCodeUfs" ), mFileSystemColorCode[15], QColor( 151,220,134 ) );
  mFileSystemColorCodeItem[15]->setLabel( /*: @label */ QCoreApplication::translate("Config", "File system colors") );
  addItem( mFileSystemColorCodeItem[15], QStringLiteral( "fileSystemColorCodeUfs" ) );
  mFileSystemColorCodeItem[16] = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "fileSystemColorCodeUnformatted" ), mFileSystemColorCode[16], QColor( 220,205,175 ) );
  mFileSystemColorCodeItem[16]->setLabel( /*: @label */ QCoreApplication::translate("Config", "File system colors") );
  addItem( mFileSystemColorCodeItem[16], QStringLiteral( "fileSystemColorCodeUnformatted" ) );
  mFileSystemColorCodeItem[17] = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "fileSystemColorCodeBtrfs" ), mFileSystemColorCode[17], QColor( 173,205,255 ) );
  mFileSystemColorCodeItem[17]->setLabel( /*: @label */ QCoreApplication::translate("Config", "File system colors") );
  addItem( mFileSystemColorCodeItem[17], QStringLiteral( "fileSystemColorCodeBtrfs" ) );
  mFileSystemColorCodeItem[18] = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "fileSystemColorCodeHpfs" ), mFileSystemColorCode[18], QColor( 176,155,185 ) );
  mFileSystemColorCodeItem[18]->setLabel( /*: @label */ QCoreApplication::translate("Config", "File system colors") );
  addItem( mFileSystemColorCodeItem[18], QStringLiteral( "fileSystemColorCodeHpfs" ) );
  mFileSystemColorCodeItem[19] = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "fileSystemColorCodeLuks" ), mFileSystemColorCode[19], QColor( 170,30,77 ) );
  mFileSystemColorCodeItem[19]->setLabel( /*: @label */ QCoreApplication::translate("Config", "File system colors") );
  addItem( mFileSystemColorCodeItem[19], QStringLiteral( "fileSystemColorCodeLuks" ) );
  mFileSystemColorCodeItem[20] = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "fileSystemColorCodeOcfs2" ), mFileSystemColorCode[20], QColor( 96,140,85 ) );
  mFileSystemColorCodeItem[20]->setLabel( /*: @label */ QCoreApplication::translate("Config", "File system colors") );
  addItem( mFileSystemColorCodeItem[20], QStringLiteral( "fileSystemColorCodeOcfs2" ) );
  mFileSystemColorCodeItem[21] = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "fileSystemColorCodeZfs" ), mFileSystemColorCode[21], QColor( 33,137,108 ) );
  mFileSystemColorCodeItem[21]->setLabel( /*: @label */ QCoreApplication::translate("Config", "File system colors") );
  addItem( mFileSystemColorCodeItem[21], QStringLiteral( "fileSystemColorCodeZfs" ) );
  mFileSystemColorCodeItem[22] = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "fileSystemColorCodeExfat" ), mFileSystemColorCode[22], QColor( 250,230,255 ) );
  mFileSystemColorCodeItem[22]->setLabel( /*: @label */ QCoreApplication::translate("Config", "File system colors") );
  addItem( mFileSystemColorCodeItem[22], QStringLiteral( "fileSystemColorCodeExfat" ) );
  mFileSystemColorCodeItem[23] = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "fileSystemColorCodeNilfs2" ), mFileSystemColorCode[23], QColor( 242,155,104 ) );
  mFileSystemColorCodeItem[23]->setLabel( /*: @label */ QCoreApplication::translate("Config", "File system colors") );
  addItem( mFileSystemColorCodeItem[23], QStringLiteral( "fileSystemColorCodeNilfs2" ) );
  mFileSystemColorCodeItem[24] = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "fileSystemColorCodeLvm2_PV" ), mFileSystemColorCode[24], QColor( 160,210,180 ) );
  mFileSystemColorCodeItem[24]->setLabel( /*: @label */ QCoreApplication::translate("Config", "File system colors") );
  addItem( mFileSystemColorCodeItem[24], QStringLiteral( "fileSystemColorCodeLvm2_PV" ) );
  mFileSystemColorCodeItem[25] = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "fileSystemColorCodeF2fs" ), mFileSystemColorCode[25], QColor( 255,170,0 ) );
  mFileSystemColorCodeItem[25]->setLabel( /*: @label */ QCoreApplication::translate("Config", "File system colors") );
  addItem( mFileSystemColorCodeItem[25], QStringLiteral( "fileSystemColorCodeF2fs" ) );
  mFileSystemColorCodeItem[26] = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "fileSystemColorCodeUdf" ), mFileSystemColorCode[26], QColor( 170,120,255 ) );
  mFileSystemColorCodeItem[26]->setLabel( /*: @label */ QCoreApplication::translate("Config", "File system colors") );
  addItem( mFileSystemColorCodeItem[26], QStringLiteral( "fileSystemColorCodeUdf" ) );
  mFileSystemColorCodeItem[27] = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "fileSystemColorCodeIso9660" ), mFileSystemColorCode[27], QColor( 177,82,69 ) );
  mFileSystemColorCodeItem[27]->setLabel( /*: @label */ QCoreApplication::translate("Config", "File system colors") );
  addItem( mFileSystemColorCodeItem[27], QStringLiteral( "fileSystemColorCodeIso9660" ) );
  mFileSystemColorCodeItem[28] = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "fileSystemColorCodeLuks2" ), mFileSystemColorCode[28], QColor( 223,39,104 ) );
  mFileSystemColorCodeItem[28]->setLabel( /*: @label */ QCoreApplication::translate("Config", "File system colors") );
  addItem( mFileSystemColorCodeItem[28], QStringLiteral( "fileSystemColorCodeLuks2" ) );
  mFileSystemColorCodeItem[29] = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "fileSystemColorCodeFat12" ), mFileSystemColorCode[29], QColor( 204,179,255 ) );
  mFileSystemColorCodeItem[29]->setLabel( /*: @label */ QCoreApplication::translate("Config", "File system colors") );
  addItem( mFileSystemColorCodeItem[29], QStringLiteral( "fileSystemColorCodeFat12" ) );
  mFileSystemColorCodeItem[30] = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "fileSystemColorCodeLinuxRaidMember" ), mFileSystemColorCode[30], QColor( 255,100,100 ) );
  mFileSystemColorCodeItem[30]->setLabel( /*: @label */ QCoreApplication::translate("Config", "File system colors") );
  addItem( mFileSystemColorCodeItem[30], QStringLiteral( "fileSystemColorCodeLinuxRaidMember" ) );
  mFileSystemColorCodeItem[31] = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "fileSystemColorCodeBitLocker" ), mFileSystemColorCode[31], QColor( 110,20,50 ) );
  mFileSystemColorCodeItem[31]->setLabel( /*: @label */ QCoreApplication::translate("Config", "File system colors") );
  addItem( mFileSystemColorCodeItem[31], QStringLiteral( "fileSystemColorCodeBitLocker" ) );
  mFileSystemColorCodeItem[32] = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "fileSystemColorCodeApfs" ), mFileSystemColorCode[32], QColor( 255,155,174 ) );
  mFileSystemColorCodeItem[32]->setLabel( /*: @label */ QCoreApplication::translate("Config", "File system colors") );
  addItem( mFileSystemColorCodeItem[32], QStringLiteral( "fileSystemColorCodeApfs" ) );
  mFileSystemColorCodeItem[33] = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "fileSystemColorCodeMinix" ), mFileSystemColorCode[33], QColor( 0,170,255 ) );
  mFileSystemColorCodeItem[33]->setLabel( /*: @label */ QCoreApplication::translate("Config", "File system colors") );
  addItem( mFileSystemColorCodeItem[33], QStringLiteral( "fileSystemColorCodeMinix" ) );
  mShowMenuBarItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "showMenuBar" ), mShowMenuBar, true );
  mShowMenuBarItem->setLabel( /*: @label */ QCoreApplication::translate("Config", "Show the application's menu bar") );
  addItem( mShowMenuBarItem, QStringLiteral( "showMenuBar" ) );
  mBackendItem = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "backend" ), mBackend );
  mBackendItem->setLabel( /*: @label */ QCoreApplication::translate("Config", "Backend plugin") );
  addItem( mBackendItem, QStringLiteral( "backend" ) );
  mDefaultFileSystemItem = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "defaultFileSystem" ), mDefaultFileSystem, static_cast<int>(FileSystem::Type::Btrfs) );
  mDefaultFileSystemItem->setLabel( QCoreApplication::translate("Config", "defaultFileSystem") );
  addItem( mDefaultFileSystemItem, QStringLiteral( "defaultFileSystem" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valuespreferredUnit;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Byte");
    valuespreferredUnit.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("KiB");
    valuespreferredUnit.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("MiB");
    valuespreferredUnit.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("GiB");
    valuespreferredUnit.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("TiB");
    valuespreferredUnit.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("PiB");
    valuespreferredUnit.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("EiB");
    valuespreferredUnit.append( choice );
  }
  mPreferredUnitItem = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "preferredUnit" ), mPreferredUnit, valuespreferredUnit, EnumPreferredUnit::MiB );
  mPreferredUnitItem->setLabel( /*: @label */ QCoreApplication::translate("Config", "Preferred unit:") );
  addItem( mPreferredUnitItem, QStringLiteral( "preferredUnit" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valuesshredSource;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("random");
    valuesshredSource.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("zeros");
    valuesshredSource.append( choice );
  }
  mShredSourceItem = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "shredSource" ), mShredSource, valuesshredSource, EnumShredSource::random );
  mShredSourceItem->setLabel( QCoreApplication::translate("Config", "shredSource") );
  addItem( mShredSourceItem, QStringLiteral( "shredSource" ) );
  mHideDeviceDockWidgetByCmdArgsItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "hideDeviceDockWidgetByCmdArgs" ), mHideDeviceDockWidgetByCmdArgs, false );
  mHideDeviceDockWidgetByCmdArgsItem->setLabel( QCoreApplication::translate("Config", "hideDeviceDockWidgetByCmdArgs") );
  addItem( mHideDeviceDockWidgetByCmdArgsItem, QStringLiteral( "hideDeviceDockWidgetByCmdArgs" ) );
}

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

