summaryrefslogtreecommitdiff
authorharlekin <harlekin>2002-04-07 13:08:50 (UTC)
committer harlekin <harlekin>2002-04-07 13:08:50 (UTC)
commit9aced2eebc244de560c1ca72786183dc93019b9d (patch) (unidiff)
treea9061ef92e0510efb552088d464ac218583f142a
parentf87f79ef356475764d8b9011c3f3b467d3015426 (diff)
downloadopie-9aced2eebc244de560c1ca72786183dc93019b9d.zip
opie-9aced2eebc244de560c1ca72786183dc93019b9d.tar.gz
opie-9aced2eebc244de560c1ca72786183dc93019b9d.tar.bz2
fixed a mem leak, patch by Stefan Eilers
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/pim/today/today.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp
index 51aba69..7cef035 100644
--- a/core/pim/today/today.cpp
+++ b/core/pim/today/today.cpp
@@ -75,6 +75,7 @@ Today::Today( QWidget* parent, const char* name, WFlags fl )
75#endif 75#endif
76#endif 76#endif
77 77
78 db = NULL;
78 setOwnerField(); 79 setOwnerField();
79 todo = new ToDoDB; 80 todo = new ToDoDB;
80 getTodo(); 81 getTodo();
@@ -209,7 +210,7 @@ void Today::init() {
209 // should only later appointments be shown or all for the current day. 210 // should only later appointments be shown or all for the current day.
210 ONLY_LATER = cfg.readNumEntry("onlylater",1); 211 ONLY_LATER = cfg.readNumEntry("onlylater",1);
211 212
212 db = new DateBookDB; 213 //db = new DateBookDB;
213} 214}
214 215
215/* 216/*
@@ -275,6 +276,11 @@ void Today::getDates() {
275 AllDateBookEvents = new QWidget( ); 276 AllDateBookEvents = new QWidget( );
276 QVBoxLayout* layoutDates = new QVBoxLayout(AllDateBookEvents); 277 QVBoxLayout* layoutDates = new QVBoxLayout(AllDateBookEvents);
277 278
279 if (db) {
280 delete db;
281 }
282 db = new DateBookDB;
283
278 QValueList<EffectiveEvent> list = db->getEffectiveEvents(date, date); 284 QValueList<EffectiveEvent> list = db->getEffectiveEvents(date, date);
279 285
280 qBubbleSort(list); 286 qBubbleSort(list);