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

#include "upnppluginsettings.h"

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

using namespace kt;

namespace kt {

class UPnPPluginSettingsHelper
{
  public:
    UPnPPluginSettingsHelper() : q(0) {}
    ~UPnPPluginSettingsHelper() { delete q; }
    UPnPPluginSettings *q;
};
}

K_GLOBAL_STATIC(UPnPPluginSettingsHelper, s_globalUPnPPluginSettings)
UPnPPluginSettings *UPnPPluginSettings::self()
{
  if (!s_globalUPnPPluginSettings->q) {
    new UPnPPluginSettings;
    s_globalUPnPPluginSettings->q->readConfig();
  }

  return s_globalUPnPPluginSettings->q;
}

UPnPPluginSettings::UPnPPluginSettings(  )
  : KConfigSkeleton( QLatin1String( "ktupnppluginrc" ) )
{
  Q_ASSERT(!s_globalUPnPPluginSettings->q);
  s_globalUPnPPluginSettings->q = this;
  setCurrentGroup( QLatin1String( "general" ) );

  KConfigSkeleton::ItemString  *itemDefaultDevice;
  itemDefaultDevice = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "defaultDevice" ), mDefaultDevice );
  addItem( itemDefaultDevice, QLatin1String( "defaultDevice" ) );
}

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

