summaryrefslogtreecommitdiffabout
path: root/pwmanager
Unidiff
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
@@ -32,5 +32,5 @@
32 32
33PWMPrefs *PWMPrefs::sInstance = 0; 33PWMPrefs *PWMPrefs::sInstance = 0;
34static KStaticDeleter<PWMPrefs> staticDeleter; 34static KStaticDeleter<PWMPrefs> staticDeleterPP;
35 35
36PWMPrefs::PWMPrefs() 36PWMPrefs::PWMPrefs()
@@ -69,5 +69,9 @@ PWMPrefs::PWMPrefs()
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
@@ -76,8 +80,8 @@ PWMPrefs *PWMPrefs::instance()
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();