summaryrefslogtreecommitdiffabout
path: root/pwmanager
authorzautrix <zautrix>2004-10-23 11:40:59 (UTC)
committer zautrix <zautrix>2004-10-23 11:40:59 (UTC)
commit25b0233d54a6d4bea457fd843073e57183d8bea0 (patch) (unidiff)
tree4d85c3cec59e8b085738be7111c7e2bb0ee7219e /pwmanager
parentba2583db0431059cd7368be23c9653e81af16d29 (diff)
downloadkdepimpi-25b0233d54a6d4bea457fd843073e57183d8bea0.zip
kdepimpi-25b0233d54a6d4bea457fd843073e57183d8bea0.tar.gz
kdepimpi-25b0233d54a6d4bea457fd843073e57183d8bea0.tar.bz2
global settings bugfixes
Diffstat (limited to 'pwmanager') (more/less context) (ignore whitespace changes)
-rw-r--r--pwmanager/pwmanager/pwmprefs.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/pwmanager/pwmanager/pwmprefs.cpp b/pwmanager/pwmanager/pwmprefs.cpp
index fdc34e0..68d5b68 100644
--- a/pwmanager/pwmanager/pwmprefs.cpp
+++ b/pwmanager/pwmanager/pwmprefs.cpp
@@ -31,7 +31,7 @@
31#include "pwmprefs.h" 31#include "pwmprefs.h"
32 32
33PWMPrefs *PWMPrefs::sInstance = 0; 33PWMPrefs *PWMPrefs::sInstance = 0;
34static KStaticDeleter<PWMPrefs> staticDeleter; 34static KStaticDeleter<PWMPrefs> staticDeleterPP;
35 35
36PWMPrefs::PWMPrefs() 36PWMPrefs::PWMPrefs()
37 : KPimPrefs("pwmanagerrc") 37 : KPimPrefs("pwmanagerrc")
@@ -68,17 +68,21 @@ PWMPrefs::PWMPrefs()
68} 68}
69 69
70PWMPrefs::~PWMPrefs() 70PWMPrefs::~PWMPrefs()
71{ 71{
72 if (sInstance == this)
73 sInstance = staticDeleterPP.setObject(0);
74 else
75 qDebug("Whats this? Error in PWMPrefs::~PWMPrefs()?");
72} 76}
73 77
74PWMPrefs *PWMPrefs::instance() 78PWMPrefs *PWMPrefs::instance()
75{ 79{
76 if ( !sInstance ) { 80 if ( !sInstance ) {
77#ifdef PWM_EMBEDDED 81#ifdef PWM_EMBEDDED
78 sInstance = staticDeleter.setObject( new PWMPrefs() ); 82 sInstance = staticDeleterPP.setObject( new PWMPrefs() );
79#else //PWM_EMBEDDED 83#else //PWM_EMBEDDED
80 //US the following line has changed ???. Why 84 //US the following line has changed ???. Why
81 staticDeleter.setObject( sInstance, new PWMPrefs() ); 85 staticDeleterPP.setObject( sInstance, new PWMPrefs() );
82#endif //KAB_EMBEDDED 86#endif //KAB_EMBEDDED
83 sInstance->readConfig(); 87 sInstance->readConfig();
84 } 88 }