-rw-r--r-- | libkcal/todo.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp index cc1c5ae..5a0c32e 100644 --- a/libkcal/todo.cpp +++ b/libkcal/todo.cpp @@ -594,65 +594,65 @@ void Todo::setPercentComplete(int v) updated(); } QDateTime Todo::getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_dt ) const { *ok = false; if ( ! hasDueDate() || cancelled() || !alarmEnabled() ) { return QDateTime (); } // if the recurring todo is set to complete and requested time < start time of todo // we want to get the alarm. bool iscompleted = isCompleted(); if ( iscompleted && doesRecur() ) { Todo * to = (Todo*) this; to->checkSetCompletedFalse(); iscompleted = isCompleted(); if ( hasStartDate() && start_dt < dtStart() ){ iscompleted = false; } } if ( iscompleted ) { return QDateTime (); } QDateTime incidenceStart; incidenceStart = dtDue(); bool enabled = false; Alarm* alarm; int off = 0; QDateTime alarmStart = QDateTime::currentDateTime().addDays( 3650 );; // if ( QDateTime::currentDateTime() > incidenceStart ){ // *ok = false; // return incidenceStart; // } - for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { + for (Q3PtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { if (alarm->enabled()) { if ( alarm->hasTime () ) { if ( alarm->time() < alarmStart ) { alarmStart = alarm->time(); enabled = true; off = alarmStart.secsTo( incidenceStart ); } } else { int secs = alarm->startOffset().asSeconds(); if ( incidenceStart.addSecs( secs ) < alarmStart ) { alarmStart = incidenceStart.addSecs( secs ); enabled = true; off = -secs; } } } } if ( enabled ) { if ( alarmStart > start_dt ) { *ok = true; * offset = off; return alarmStart; } } *ok = false; return QDateTime (); } void Todo::checkSetCompletedFalse() { |