-rw-r--r-- | pwmanager/pwmanager/pwmprefs.cpp | 12 |
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 | ||
33 | PWMPrefs *PWMPrefs::sInstance = 0; | 33 | PWMPrefs *PWMPrefs::sInstance = 0; |
34 | static KStaticDeleter<PWMPrefs> staticDeleter; | 34 | static KStaticDeleter<PWMPrefs> staticDeleterPP; |
35 | 35 | ||
36 | PWMPrefs::PWMPrefs() | 36 | PWMPrefs::PWMPrefs() |
@@ -69,5 +69,9 @@ PWMPrefs::PWMPrefs() | |||
69 | 69 | ||
70 | PWMPrefs::~PWMPrefs() | 70 | PWMPrefs::~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(); |