author | zautrix <zautrix> | 2004-10-23 14:56:10 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-23 14:56:10 (UTC) |
commit | a682b1d39c63cff8d709c67460569c70b661d889 (patch) (unidiff) | |
tree | dd5cb4052b07927b63bafa68b2fd6d40bce6a6dc /pwmanager | |
parent | 73c0cb5307a8276f628765c651ef0284b85d64de (diff) | |
download | kdepimpi-a682b1d39c63cff8d709c67460569c70b661d889.zip kdepimpi-a682b1d39c63cff8d709c67460569c70b661d889.tar.gz kdepimpi-a682b1d39c63cff8d709c67460569c70b661d889.tar.bz2 |
fixed several memory leaks
-rw-r--r-- | pwmanager/pwmanager/main.cpp | 2 | ||||
-rw-r--r-- | pwmanager/pwmanager/pwm.cpp | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/pwmanager/pwmanager/main.cpp b/pwmanager/pwmanager/main.cpp index 3f2d055..81e257f 100644 --- a/pwmanager/pwmanager/main.cpp +++ b/pwmanager/pwmanager/main.cpp | |||
@@ -199,15 +199,15 @@ int main(int argc, char *argv[]) | |||
199 | a.showMainWidget( &m ); | 199 | a.showMainWidget( &m ); |
200 | #else | 200 | #else |
201 | a.setMainWidget( &m ); | 201 | a.setMainWidget( &m ); |
202 | m.resize (640, 480 ); | 202 | m.resize (640, 480 ); |
203 | m.show(); | 203 | m.show(); |
204 | #endif | 204 | #endif |
205 | */ | 205 | */ |
206 | a.exec(); | 206 | a.exec(); |
207 | 207 | KPimGlobalPrefs::instance()->writeConfig(); | |
208 | } | 208 | } |
209 | qDebug("PWMPI: Bye! "); | 209 | qDebug("PWMPI: Bye! "); |
210 | 210 | ||
211 | #endif | 211 | #endif |
212 | 212 | ||
213 | } | 213 | } |
diff --git a/pwmanager/pwmanager/pwm.cpp b/pwmanager/pwmanager/pwm.cpp index b7b5307..d92c90d 100644 --- a/pwmanager/pwmanager/pwm.cpp +++ b/pwmanager/pwmanager/pwm.cpp | |||
@@ -167,16 +167,17 @@ enum { | |||
167 | 167 | ||
168 | PwM::PwM(PwMInit *_init, PwMDoc *doc, | 168 | PwM::PwM(PwMInit *_init, PwMDoc *doc, |
169 | bool virginity, | 169 | bool virginity, |
170 | QWidget *parent, const char *name) | 170 | QWidget *parent, const char *name) |
171 | : KMainWindow(parent, "HALLO") | 171 | : KMainWindow(parent, "HALLO") |
172 | , forceQuit (false) | 172 | , forceQuit (false) |
173 | , forceMinimizeToTray (false) | 173 | , forceMinimizeToTray (false) |
174 | { | 174 | { |
175 | syncManager = 0; | ||
175 | virgin = !virginity; | 176 | virgin = !virginity; |
176 | init = _init; | 177 | init = _init; |
177 | connect(doc, SIGNAL(docClosed(PwMDoc *)), | 178 | connect(doc, SIGNAL(docClosed(PwMDoc *)), |
178 | this, SLOT(docClosed(PwMDoc *))); | 179 | this, SLOT(docClosed(PwMDoc *))); |
179 | initMenubar(); | 180 | initMenubar(); |
180 | initToolbar(); | 181 | initToolbar(); |
181 | initMetrics(); | 182 | initMetrics(); |
182 | setVirgin(virginity); | 183 | setVirgin(virginity); |
@@ -194,16 +195,17 @@ PwM::~PwM() | |||
194 | { | 195 | { |
195 | //qDebug("PwM::~PwM()"); | 196 | //qDebug("PwM::~PwM()"); |
196 | disconnect(curDoc(), SIGNAL(docClosed(PwMDoc *)), | 197 | disconnect(curDoc(), SIGNAL(docClosed(PwMDoc *)), |
197 | this, SLOT(docClosed(PwMDoc *))); | 198 | this, SLOT(docClosed(PwMDoc *))); |
198 | conf()->confWndMainWndSize(size()); | 199 | conf()->confWndMainWndSize(size()); |
199 | emit closed(this); | 200 | emit closed(this); |
200 | //qDebug("PwM::~PwM() emited closed(this)"); | 201 | //qDebug("PwM::~PwM() emited closed(this)"); |
201 | delete view; | 202 | delete view; |
203 | delete syncManager; | ||
202 | } | 204 | } |
203 | 205 | ||
204 | void PwM::initMenubar() | 206 | void PwM::initMenubar() |
205 | { | 207 | { |
206 | KIconLoader* picons; | 208 | KIconLoader* picons; |
207 | #ifndef PWM_EMBEDDED | 209 | #ifndef PWM_EMBEDDED |
208 | KIconLoader icons; | 210 | KIconLoader icons; |
209 | picons = &icons; | 211 | picons = &icons; |