summaryrefslogtreecommitdiff
authorzecke <zecke>2004-09-12 20:43:22 (UTC)
committer zecke <zecke>2004-09-12 20:43:22 (UTC)
commit0f705db7c338e9642294823333e5f4410aa0573f (patch) (side-by-side diff)
tree98e35fc5d53b0730ebeb49baaff391b5cd28386f
parent40440f2652c582c108a5236d8b5398dbd6b68b18 (diff)
downloadopie-0f705db7c338e9642294823333e5f4410aa0573f.zip
opie-0f705db7c338e9642294823333e5f4410aa0573f.tar.gz
opie-0f705db7c338e9642294823333e5f4410aa0573f.tar.bz2
Delete the d pointer
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--library/datebookdb.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/library/datebookdb.cpp b/library/datebookdb.cpp
index e4ec2bf..165a637 100644
--- a/library/datebookdb.cpp
+++ b/library/datebookdb.cpp
@@ -361,64 +361,67 @@ static bool nextAlarm( const Event &ev, QDateTime& when, int& warn)
static void addEventAlarm( const Event &ev )
{
QDateTime when;
int warn;
if ( nextAlarm(ev,when,warn) )
AlarmServer::addAlarm( when,
"QPE/Application/datebook",
"alarm(QDateTime,int)", warn );
}
static void delEventAlarm( const Event &ev )
{
QDateTime when;
int warn;
if ( nextAlarm(ev,when,warn) )
AlarmServer::deleteAlarm( when,
"QPE/Application/datebook",
"alarm(QDateTime,int)", warn );
}
DateBookDB::DateBookDB()
{
init();
}
DateBookDB::~DateBookDB()
{
save();
eventList.clear();
repeatEvents.clear();
+
+ delete d;
+ d=0;
}
//#### Why is this code duplicated in getEffectiveEvents ?????
//#### Addendum. Don't use this function, lets faze it out if we can.
QValueList<Event> DateBookDB::getEvents( const QDate &from, const QDate &to )
{
QValueList<Event> tmpList;
tmpList = getNonRepeatingEvents( from, to );
// check for repeating events...
for (QValueList<Event>::ConstIterator it = repeatEvents.begin();
it != repeatEvents.end(); ++it) {
QDate itDate = from;
QDateTime due;
/* create a false end date, to short circuit on hard
MonthlyDay recurences */
Event dummy_event = *it;
Event::RepeatPattern r = dummy_event.repeatPattern();
if ( !r.hasEndDate || r.endDate() > to ) {
r.setEndDate( to );
r.hasEndDate = TRUE;
}
dummy_event.setRepeat(TRUE, r);
while (nextOccurance(dummy_event, itDate, due)) {
if (due.date() > to)
break;
Event newEvent = *it;
newEvent.setStart(due);
newEvent.setEnd(due.addSecs((*it).start().secsTo((*it).end())));