summaryrefslogtreecommitdiffabout
path: root/pwmanager/pwmanager/pwmprefs.cpp
Unidiff
Diffstat (limited to 'pwmanager/pwmanager/pwmprefs.cpp') (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
@@ -33,3 +33,3 @@
33PWMPrefs *PWMPrefs::sInstance = 0; 33PWMPrefs *PWMPrefs::sInstance = 0;
34static KStaticDeleter<PWMPrefs> staticDeleter; 34static KStaticDeleter<PWMPrefs> staticDeleterPP;
35 35
@@ -70,3 +70,7 @@ PWMPrefs::PWMPrefs()
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}
@@ -77,6 +81,6 @@ PWMPrefs *PWMPrefs::instance()
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