summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/todo.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp
index 473247a..38ba2c7 100644
--- a/libkcal/todo.cpp
+++ b/libkcal/todo.cpp
@@ -548,30 +548,33 @@ QDateTime Todo::getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_d
off = -secs;
}
}
}
}
if ( enabled ) {
if ( alarmStart > start_dt ) {
*ok = true;
* offset = off;
return alarmStart;
}
}
*ok = false;
return QDateTime ();
}
void Todo::checkSetCompletedFalse()
{
if ( !hasRecurrenceID() ) {
qDebug("ERROR 1 in Todo::checkSetCompletedFalse");
}
// qDebug("Todo::checkSetCompletedFalse()");
//qDebug("%s %s %s ",mDtStart.toString().latin1(), dtDue().toString().latin1(),mRecurrenceID.toString().latin1() );
- if ( mPercentComplete == 100 && mDtStart == mRecurrenceID && QDateTime::currentDateTime() > mDtStart) {
- qDebug("%s %s %s ",mDtStart.toString().latin1(), dtDue().toString().latin1(),mRecurrenceID.toString().latin1() );
- setCompleted( false );
- qDebug("Todo::checkSetCompletedFalse ");
+ if ( mPercentComplete == 100 ) {
+ QDateTime dt = QDateTime::currentDateTime();
+ if ( dt > mDtStart && dt > mRecurrenceID ) {
+ qDebug("start: %s --due: %s --recID: %s ",mDtStart.toString().latin1(), dtDue().toString().latin1(),mRecurrenceID.toString().latin1() );
+ setCompleted( false );
+ qDebug("Todo::checkSetCompletedFalse ");
+ }
}
}