summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/today.cpp10
1 files changed, 8 insertions, 2 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
@@ -74,8 +74,9 @@ Today::Today( QWidget* parent, const char* name, WFlags fl )
this, SLOT ( channelReceived(const QCString &, const QByteArray &)) );
#endif
#endif
+ db = NULL;
setOwnerField();
todo = new ToDoDB;
getTodo();
draw();
@@ -208,9 +209,9 @@ void Today::init() {
SHOW_NOTES = cfg.readNumEntry("shownotes",0);
// should only later appointments be shown or all for the current day.
ONLY_LATER = cfg.readNumEntry("onlylater",1);
- db = new DateBookDB;
+ //db = new DateBookDB;
}
/*
* The method for the configuration dialog.
@@ -273,9 +274,14 @@ void Today::getDates() {
if (AllDateBookEvents) delete AllDateBookEvents;
AllDateBookEvents = new QWidget( );
QVBoxLayout* layoutDates = new QVBoxLayout(AllDateBookEvents);
-
+
+ if (db) {
+ delete db;
+ }
+ db = new DateBookDB;
+
QValueList<EffectiveEvent> list = db->getEffectiveEvents(date, date);
qBubbleSort(list);
// printf("Get dates\n");