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

#include "phpdocssettings.h"

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

class PhpDocsSettingsHelper
{
  public:
    PhpDocsSettingsHelper() noexcept : q(nullptr) {}
    ~PhpDocsSettingsHelper() noexcept { delete q; q = nullptr; }
    PhpDocsSettingsHelper(const PhpDocsSettingsHelper&) = delete;
    PhpDocsSettingsHelper& operator=(const PhpDocsSettingsHelper&) = delete;
    PhpDocsSettings *q;
};
Q_GLOBAL_STATIC(PhpDocsSettingsHelper, s_globalPhpDocsSettings)
PhpDocsSettings *PhpDocsSettings::self()
{
  if (!s_globalPhpDocsSettings()->q) {
    new PhpDocsSettings;
    s_globalPhpDocsSettings()->q->read();
  }

  return s_globalPhpDocsSettings()->q;
}

PhpDocsSettings::PhpDocsSettings( )
  : KConfigSkeleton( QStringLiteral( "kdeveloprc" ) )
{
  Q_ASSERT(!s_globalPhpDocsSettings()->q);
  s_globalPhpDocsSettings()->q = this;
  setCurrentGroup( QStringLiteral( "PHP Documentation" ) );

  mPhpDocLocationItem = new KConfigSkeleton::ItemUrl( currentGroup(), QStringLiteral( "phpDocLocation" ), mPhpDocLocation, QUrl::fromUserInput( QStringLiteral( "https://php.net" )) );
  mPhpDocLocationItem->setLabel( QCoreApplication::translate("PhpDocsSettings", "Specifies the location of the PHP documentation to use.") );
  mPhpDocLocationItem->setToolTip( QCoreApplication::translate("PhpDocsSettings", "The location of the PHP documentation to use. You can either use a remote\n"
"                 location like https://php.net or a local directory which contains the\n"
"                 PHP documentation in HTML format with many files.") );
  mPhpDocLocationItem->setWhatsThis( QCoreApplication::translate("PhpDocsSettings", "Make sure local copies are downloaded in HTML format with many files.\n"
"        ") );
  addItem( mPhpDocLocationItem, QStringLiteral( "phpDocLocation" ) );
}

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

