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

#include "checksumsearchsettings.h"

#include <kglobal.h>
#include <QtCore/QFile>

class ChecksumSearchSettingsHelper
{
  public:
    ChecksumSearchSettingsHelper() : q(0) {}
    ~ChecksumSearchSettingsHelper() { delete q; }
    ChecksumSearchSettings *q;
};
K_GLOBAL_STATIC(ChecksumSearchSettingsHelper, s_globalChecksumSearchSettings)
ChecksumSearchSettings *ChecksumSearchSettings::self()
{
  if (!s_globalChecksumSearchSettings->q) {
    new ChecksumSearchSettings;
    s_globalChecksumSearchSettings->q->readConfig();
  }

  return s_globalChecksumSearchSettings->q;
}

ChecksumSearchSettings::ChecksumSearchSettings(  )
  : KConfigSkeleton( QLatin1String( "kget_checksumsearchfactory.rc" ) )
{
  Q_ASSERT(!s_globalChecksumSearchSettings->q);
  s_globalChecksumSearchSettings->q = this;
  setCurrentGroup( QLatin1String( "ChecksumSearch" ) );

  QStringList defaultSearchStrings;
  defaultSearchStrings.append( QString::fromUtf8( ".md5" ) );
  defaultSearchStrings.append( QString::fromUtf8( "MD5SUMS" ) );
  defaultSearchStrings.append( QString::fromUtf8( ".sha1" ) );
  defaultSearchStrings.append( QString::fromUtf8( "SHA1SUMS" ) );
  defaultSearchStrings.append( QString::fromUtf8( "-CHECKSUM" ) );

  KConfigSkeleton::ItemStringList  *itemSearchStrings;
  itemSearchStrings = new KConfigSkeleton::ItemStringList( currentGroup(), QLatin1String( "SearchStrings" ), mSearchStrings, defaultSearchStrings );
  addItem( itemSearchStrings, QLatin1String( "SearchStrings" ) );
  QList<int> defaultUrlChangeModeList;
  defaultUrlChangeModeList.append( 0 );
  defaultUrlChangeModeList.append( 1 );
  defaultUrlChangeModeList.append( 0 );
  defaultUrlChangeModeList.append( 1 );
  defaultUrlChangeModeList.append( 2 );

  KConfigSkeleton::ItemIntList  *itemUrlChangeModeList;
  itemUrlChangeModeList = new KConfigSkeleton::ItemIntList( currentGroup(), QLatin1String( "UrlChangeModeList" ), mUrlChangeModeList, defaultUrlChangeModeList );
  addItem( itemUrlChangeModeList, QLatin1String( "UrlChangeModeList" ) );
  QStringList defaultChecksumTypeList;
  defaultChecksumTypeList.append( QString::fromUtf8( "md5" ) );
  defaultChecksumTypeList.append( QString::fromUtf8( "md5" ) );
  defaultChecksumTypeList.append( QString::fromUtf8( "sha1" ) );
  defaultChecksumTypeList.append( QString::fromUtf8( "sha1" ) );
  defaultChecksumTypeList.append( QString::fromUtf8( "" ) );

  KConfigSkeleton::ItemStringList  *itemChecksumTypeList;
  itemChecksumTypeList = new KConfigSkeleton::ItemStringList( currentGroup(), QLatin1String( "ChecksumTypeList" ), mChecksumTypeList, defaultChecksumTypeList );
  addItem( itemChecksumTypeList, QLatin1String( "ChecksumTypeList" ) );
}

ChecksumSearchSettings::~ChecksumSearchSettings()
{
  if (!s_globalChecksumSearchSettings.isDestroyed()) {
    s_globalChecksumSearchSettings->q = 0;
  }
}

