diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-03-01 19:19:25 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-03-01 19:19:25 +0000 |
commit | e0311ffdf88fc311006351582b959a69d8aad328 (patch) | |
tree | dccf6212f21ef7e3824b54837be7b1d14139d2e1 /src/waconfig.cpp | |
download | wlassistant-e0311ffdf88fc311006351582b959a69d8aad328.tar.gz wlassistant-e0311ffdf88fc311006351582b959a69d8aad328.zip |
Added KDE3 version of wlassistant
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/wlassistant@1097621 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/waconfig.cpp')
-rw-r--r-- | src/waconfig.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/waconfig.cpp b/src/waconfig.cpp new file mode 100644 index 0000000..aadad38 --- /dev/null +++ b/src/waconfig.cpp @@ -0,0 +1,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( QString::fromLatin1( "wlassistantrc" ) ) +{ + mSelf = this; +} + +WAConfig::~WAConfig() +{ + if ( mSelf == this ) + staticWAConfigDeleter.setObject( mSelf, 0, false ); +} + |