summaryrefslogtreecommitdiffabout
path: root/libkcal/calendarlocal.cpp
Unidiff
Diffstat (limited to 'libkcal/calendarlocal.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libkcal/calendarlocal.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp
index e75df70..bc76c0b 100644
--- a/libkcal/calendarlocal.cpp
+++ b/libkcal/calendarlocal.cpp
@@ -303,13 +303,13 @@ void CalendarLocal::checkAlarmForIncidence( Incidence * incidence, bool deleted
303 // QString nextSum; 303 // QString nextSum;
304 //QDateTime nextEvent; 304 //QDateTime nextEvent;
305 if ( mNextAlarmIncidence == 0 || incidence == 0 ) { 305 if ( mNextAlarmIncidence == 0 || incidence == 0 ) {
306 computeNextAlarm = true; 306 computeNextAlarm = true;
307 } else { 307 } else {
308 if ( ! deleted ) { 308 if ( ! deleted ) {
309 nextA = incidence->getNextAlarmDateTime(& ok, &offset ) ; 309 nextA = incidence->getNextAlarmDateTime(& ok, &offset, QDateTime::currentDateTime() ) ;
310 if ( ok ) { 310 if ( ok ) {
311 if ( nextA < mNextAlarmDateTime ) { 311 if ( nextA < mNextAlarmDateTime ) {
312 deRegisterAlarm(); 312 deRegisterAlarm();
313 mNextAlarmDateTime = nextA; 313 mNextAlarmDateTime = nextA;
314 mNextSummary = incidence->summary(); 314 mNextSummary = incidence->summary();
315 mNextAlarmEventDateTime = nextA.addSecs(offset ) ; 315 mNextAlarmEventDateTime = nextA.addSecs(offset ) ;
@@ -418,26 +418,26 @@ QDateTime CalendarLocal::nextAlarm( int daysTo )
418 Event *e; 418 Event *e;
419 bool ok; 419 bool ok;
420 bool found = false; 420 bool found = false;
421 int offset; 421 int offset;
422 mNextAlarmIncidence = 0; 422 mNextAlarmIncidence = 0;
423 for( e = mEventList.first(); e; e = mEventList.next() ) { 423 for( e = mEventList.first(); e; e = mEventList.next() ) {
424 next = e->getNextAlarmDateTime(& ok, &offset ) ; 424 next = e->getNextAlarmDateTime(& ok, &offset, QDateTime::currentDateTime() ) ;
425 if ( ok ) { 425 if ( ok ) {
426 if ( next < nextA ) { 426 if ( next < nextA ) {
427 nextA = next; 427 nextA = next;
428 found = true; 428 found = true;
429 mNextSummary = e->summary(); 429 mNextSummary = e->summary();
430 mNextAlarmEventDateTime = next.addSecs(offset ) ; 430 mNextAlarmEventDateTime = next.addSecs(offset ) ;
431 mNextAlarmIncidence = (Incidence *) e; 431 mNextAlarmIncidence = (Incidence *) e;
432 } 432 }
433 } 433 }
434 } 434 }
435 Todo *t; 435 Todo *t;
436 for( t = mTodoList.first(); t; t = mTodoList.next() ) { 436 for( t = mTodoList.first(); t; t = mTodoList.next() ) {
437 next = t->getNextAlarmDateTime(& ok, &offset ) ; 437 next = t->getNextAlarmDateTime(& ok, &offset, QDateTime::currentDateTime() ) ;
438 if ( ok ) { 438 if ( ok ) {
439 if ( next < nextA ) { 439 if ( next < nextA ) {
440 nextA = next; 440 nextA = next;
441 found = true; 441 found = true;
442 mNextSummary = t->summary(); 442 mNextSummary = t->summary();
443 mNextAlarmEventDateTime = next.addSecs(offset ); 443 mNextAlarmEventDateTime = next.addSecs(offset );