author | zautrix <zautrix> | 2005-06-03 23:10:45 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-03 23:10:45 (UTC) |
commit | 858b047efb5627824438cb3877e7bec0cebb3751 (patch) (side-by-side diff) | |
tree | 7b36963344d4f5019f3a1ecb5eb9290f27c3b3c7 /libkcal | |
parent | 0207d193bdb6c66201562a17e68872e018ec223c (diff) | |
download | kdepimpi-858b047efb5627824438cb3877e7bec0cebb3751.zip kdepimpi-858b047efb5627824438cb3877e7bec0cebb3751.tar.gz kdepimpi-858b047efb5627824438cb3877e7bec0cebb3751.tar.bz2 |
fixxx
-rw-r--r-- | libkcal/calendarlocal.cpp | 6 | ||||
-rw-r--r-- | libkcal/event.cpp | 6 | ||||
-rw-r--r-- | libkcal/event.h | 2 | ||||
-rw-r--r-- | libkcal/incidence.h | 2 | ||||
-rw-r--r-- | libkcal/journal.cpp | 2 | ||||
-rw-r--r-- | libkcal/journal.h | 2 | ||||
-rw-r--r-- | libkcal/todo.cpp | 4 | ||||
-rw-r--r-- | libkcal/todo.h | 2 |
8 files changed, 13 insertions, 13 deletions
diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp index e75df70..bc76c0b 100644 --- a/libkcal/calendarlocal.cpp +++ b/libkcal/calendarlocal.cpp @@ -306,7 +306,7 @@ void CalendarLocal::checkAlarmForIncidence( Incidence * incidence, bool deleted computeNextAlarm = true; } else { if ( ! deleted ) { - nextA = incidence->getNextAlarmDateTime(& ok, &offset ) ; + nextA = incidence->getNextAlarmDateTime(& ok, &offset, QDateTime::currentDateTime() ) ; if ( ok ) { if ( nextA < mNextAlarmDateTime ) { deRegisterAlarm(); @@ -421,7 +421,7 @@ QDateTime CalendarLocal::nextAlarm( int daysTo ) int offset; mNextAlarmIncidence = 0; for( e = mEventList.first(); e; e = mEventList.next() ) { - next = e->getNextAlarmDateTime(& ok, &offset ) ; + next = e->getNextAlarmDateTime(& ok, &offset, QDateTime::currentDateTime() ) ; if ( ok ) { if ( next < nextA ) { nextA = next; @@ -434,7 +434,7 @@ QDateTime CalendarLocal::nextAlarm( int daysTo ) } Todo *t; for( t = mTodoList.first(); t; t = mTodoList.next() ) { - next = t->getNextAlarmDateTime(& ok, &offset ) ; + next = t->getNextAlarmDateTime(& ok, &offset, QDateTime::currentDateTime() ) ; if ( ok ) { if ( next < nextA ) { nextA = next; diff --git a/libkcal/event.cpp b/libkcal/event.cpp index de8dceb..9b99855 100644 --- a/libkcal/event.cpp +++ b/libkcal/event.cpp @@ -171,11 +171,11 @@ void Event::setDuration(int seconds) setHasEndDate(false); Incidence::setDuration(seconds); } -QDateTime Event::getNextAlarmDateTime( bool * ok, int * offset ) const +QDateTime Event::getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_dt ) const { bool yes; - QDateTime incidenceStart = getNextOccurence( QDateTime::currentDateTime(), &yes ); + QDateTime incidenceStart = getNextOccurence( start_dt, &yes ); if ( ! yes || cancelled() ) { *ok = false; return QDateTime (); @@ -209,7 +209,7 @@ QDateTime Event::getNextAlarmDateTime( bool * ok, int * offset ) const } } if ( enabled ) { - if ( alarmStart > QDateTime::currentDateTime() ) { + if ( alarmStart > start_dt ) { *ok = true; * offset = off; return alarmStart; diff --git a/libkcal/event.h b/libkcal/event.h index 3bc8adc..8729956 100644 --- a/libkcal/event.h +++ b/libkcal/event.h @@ -42,7 +42,7 @@ class Event : public Incidence QCString type() const { return "Event"; } Incidence *clone(); - QDateTime getNextAlarmDateTime( bool * ok, int * offset ) const; + QDateTime getNextAlarmDateTime( bool * ok, int * offset ,QDateTime start_dt ) const; /** for setting an event's ending date/time with a QDateTime. */ void setDtEnd(const QDateTime &dtEnd); diff --git a/libkcal/incidence.h b/libkcal/incidence.h index ebd50d0..aa51e84 100644 --- a/libkcal/incidence.h +++ b/libkcal/incidence.h @@ -114,7 +114,7 @@ class Incidence : public IncidenceBase virtual Incidence *clone() = 0; virtual void cloneRelations( Incidence * ); - virtual QDateTime getNextAlarmDateTime( bool * ok, int * offset ) const = 0; + virtual QDateTime getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_dt ) const = 0; void setReadOnly( bool ); /** diff --git a/libkcal/journal.cpp b/libkcal/journal.cpp index 351fb32..859161f 100644 --- a/libkcal/journal.cpp +++ b/libkcal/journal.cpp @@ -42,7 +42,7 @@ bool KCal::operator==( const Journal& j1, const Journal& j2 ) } -QDateTime Journal::getNextAlarmDateTime( bool * ok, int * offset ) const +QDateTime Journal::getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_dt ) const { *ok = false; return QDateTime (); diff --git a/libkcal/journal.h b/libkcal/journal.h index cb90c7a..2c1d7ea 100644 --- a/libkcal/journal.h +++ b/libkcal/journal.h @@ -39,7 +39,7 @@ class Journal : public Incidence QCString type() const { return "Journal"; } Incidence *clone(); - QDateTime getNextAlarmDateTime( bool * ok, int * offset ) const; + QDateTime getNextAlarmDateTime( bool * ok, int * offset ,QDateTime start_dt ) const; private: bool accept(Visitor &v) { return v.visit(this); } }; diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp index d7431c7..473247a 100644 --- a/libkcal/todo.cpp +++ b/libkcal/todo.cpp @@ -515,7 +515,7 @@ void Todo::setPercentComplete(int v) mHasCompletedDate = false; updated(); } -QDateTime Todo::getNextAlarmDateTime( bool * ok, int * offset ) const +QDateTime Todo::getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_dt ) const { if ( isCompleted() || ! hasDueDate() || cancelled() ) { *ok = false; @@ -551,7 +551,7 @@ QDateTime Todo::getNextAlarmDateTime( bool * ok, int * offset ) const } } if ( enabled ) { - if ( alarmStart > QDateTime::currentDateTime() ) { + if ( alarmStart > start_dt ) { *ok = true; * offset = off; return alarmStart; diff --git a/libkcal/todo.h b/libkcal/todo.h index a5354ce..ab8fdf1 100644 --- a/libkcal/todo.h +++ b/libkcal/todo.h @@ -44,7 +44,7 @@ namespace KCal { /** Return an exact copy of this todo. */ Incidence *clone(); - QDateTime getNextAlarmDateTime( bool * ok, int * offset ) const; + QDateTime getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_dt ) const; /** for setting the todo's due date/time with a QDateTime. */ void setDtDue(const QDateTime &dtDue); |