summaryrefslogtreecommitdiffstats
path: root/src/waconfig.cpp
blob: 68303adc4e1004b4cb3f7d925798e080e000fda7 (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(  )
  : TDEConfigSkeleton( TQString::fromLatin1( "wlassistantrc" ) )
{
  mSelf = this;
}

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