summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-07-01 04:42:26 (UTC)
committer zautrix <zautrix>2005-07-01 04:42:26 (UTC)
commit4a47a69978fd392be65ea67c5153d5e2ade74c19 (patch) (unidiff)
tree4208a2955c206adc826209c7854e0c628c1c5441
parentd401e425af46703a89eb80802606edeea06c9538 (diff)
downloadkdepimpi-4a47a69978fd392be65ea67c5153d5e2ade74c19.zip
kdepimpi-4a47a69978fd392be65ea67c5153d5e2ade74c19.tar.gz
kdepimpi-4a47a69978fd392be65ea67c5153d5e2ade74c19.tar.bz2
alarm fixx
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--libkcal/todo.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp
index 5260051..4ada2d8 100644
--- a/libkcal/todo.cpp
+++ b/libkcal/todo.cpp
@@ -537,8 +537,22 @@ void Todo::setPercentComplete(int v)
537} 537}
538QDateTime Todo::getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_dt ) const 538QDateTime Todo::getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_dt ) const
539{ 539{
540 if ( isCompleted() || ! hasDueDate() || cancelled() || !alarmEnabled() ) {
541 *ok = false; 540 *ok = false;
541 if ( ! hasDueDate() || cancelled() || !alarmEnabled() ) {
542 return QDateTime ();
543 }
544 // if the recurring todo is set to complete and requested time < start time of todo
545 // we want to get the alarm.
546 bool iscompleted = isCompleted();
547 if ( iscompleted && doesRecur() ) {
548 Todo * to = (Todo*) this;
549 to->checkSetCompletedFalse();
550 iscompleted = isCompleted();
551 if ( hasStartDate() && start_dt < dtStart() ){
552 iscompleted = false;
553 }
554 }
555 if ( iscompleted ) {
542 return QDateTime (); 556 return QDateTime ();
543 } 557 }
544 QDateTime incidenceStart; 558 QDateTime incidenceStart;