summaryrefslogtreecommitdiffstats
path: root/src/waconfig.cpp
blob: 4dc5d41e7c8750f33382c2b84c06701fe895157e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include "waconfig.h"

#include <kstaticdeleter.h>

WAConfig *WAConfig::mSelf = 0;
static KStaticDeleter<WAConfig> staticWAConfigDeleter;

WAConfig *WAConfig::self()
{
  if ( !mSelf ) {
    staticWAConfigDeleter.setObject( mSelf, new WAConfig() );
    mSelf->readConfig();
  }

  return mSelf;
}

WAConfig::WAConfig(  )
  : KConfigSkeleton( TQString::fromLatin1( "wlassistantrc" ) )
{
  mSelf = this;
}

WAConfig::~WAConfig()
{
  if ( mSelf == this )
    staticWAConfigDeleter.setObject( mSelf, 0, false );
}