From 9aced2eebc244de560c1ca72786183dc93019b9d Mon Sep 17 00:00:00 2001 From: harlekin Date: Sun, 07 Apr 2002 13:08:50 +0000 Subject: fixed a mem leak, patch by Stefan Eilers --- 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 ) #endif #endif + db = NULL; setOwnerField(); todo = new ToDoDB; getTodo(); @@ -209,7 +210,7 @@ void Today::init() { // should only later appointments be shown or all for the current day. ONLY_LATER = cfg.readNumEntry("onlylater",1); - db = new DateBookDB; + //db = new DateBookDB; } /* @@ -274,7 +275,12 @@ void Today::getDates() { if (AllDateBookEvents) delete AllDateBookEvents; AllDateBookEvents = new QWidget( ); QVBoxLayout* layoutDates = new QVBoxLayout(AllDateBookEvents); - + + if (db) { + delete db; + } + db = new DateBookDB; + QValueList list = db->getEffectiveEvents(date, date); qBubbleSort(list); -- cgit v0.9.0.2