-rw-r--r-- | libkcal/todo.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp index 1f54c2f..39d16b6 100644 --- a/libkcal/todo.cpp +++ b/libkcal/todo.cpp | |||
@@ -360,25 +360,25 @@ bool Todo::hasCompletedDate() const | |||
360 | } | 360 | } |
361 | 361 | ||
362 | int Todo::percentComplete() const | 362 | int Todo::percentComplete() const |
363 | { | 363 | { |
364 | return mPercentComplete; | 364 | return mPercentComplete; |
365 | } | 365 | } |
366 | bool Todo::setRecurDates() | 366 | bool Todo::setRecurDates() |
367 | { | 367 | { |
368 | if ( !mHasRecurrenceID ) | 368 | if ( !mHasRecurrenceID ) |
369 | return true; | 369 | return true; |
370 | int secs = mDtStart.secsTo( dtDue() ); | 370 | int secs = mDtStart.secsTo( dtDue() ); |
371 | bool ok; | 371 | bool ok; |
372 | qDebug("--------------------setRecurDates() "); | 372 | qDebug("T:setRecurDates() "); |
373 | //qDebug("%s %s %s ",mDtStart.toString().latin1(), dtDue().toString().latin1(),mRecurrenceID.toString().latin1() ); | 373 | //qDebug("%s %s %s ",mDtStart.toString().latin1(), dtDue().toString().latin1(),mRecurrenceID.toString().latin1() ); |
374 | QDateTime next = getNextOccurence( mRecurrenceID, &ok ); | 374 | QDateTime next = getNextOccurence( mRecurrenceID, &ok ); |
375 | if ( ok ) { | 375 | if ( ok ) { |
376 | mRecurrenceID = next; | 376 | mRecurrenceID = next; |
377 | mDtStart = next; | 377 | mDtStart = next; |
378 | setDtDue( next.addSecs( secs ) ); | 378 | setDtDue( next.addSecs( secs ) ); |
379 | if ( QDateTime::currentDateTime() > next) | 379 | if ( QDateTime::currentDateTime() > next) |
380 | return false; | 380 | return false; |
381 | } else { | 381 | } else { |
382 | setHasRecurrenceID( false ); | 382 | setHasRecurrenceID( false ); |
383 | recurrence()->unsetRecurs(); | 383 | recurrence()->unsetRecurs(); |
384 | } | 384 | } |
@@ -443,15 +443,15 @@ QDateTime Todo::getNextAlarmDateTime( bool * ok, int * offset ) const | |||
443 | } | 443 | } |
444 | 444 | ||
445 | void Todo::checkSetCompletedFalse() | 445 | void Todo::checkSetCompletedFalse() |
446 | { | 446 | { |
447 | if ( !hasRecurrenceID() ) { | 447 | if ( !hasRecurrenceID() ) { |
448 | qDebug("ERROR 1 in Todo::checkSetCompletedFalse"); | 448 | qDebug("ERROR 1 in Todo::checkSetCompletedFalse"); |
449 | } | 449 | } |
450 | // qDebug("Todo::checkSetCompletedFalse()"); | 450 | // qDebug("Todo::checkSetCompletedFalse()"); |
451 | //qDebug("%s %s %s ",mDtStart.toString().latin1(), dtDue().toString().latin1(),mRecurrenceID.toString().latin1() ); | 451 | //qDebug("%s %s %s ",mDtStart.toString().latin1(), dtDue().toString().latin1(),mRecurrenceID.toString().latin1() ); |
452 | if ( mPercentComplete == 100 && mDtStart == mRecurrenceID && QDateTime::currentDateTime() > mDtStart) { | 452 | if ( mPercentComplete == 100 && mDtStart == mRecurrenceID && QDateTime::currentDateTime() > mDtStart) { |
453 | qDebug("%s %s %s ",mDtStart.toString().latin1(), dtDue().toString().latin1(),mRecurrenceID.toString().latin1() ); | 453 | qDebug("%s %s %s ",mDtStart.toString().latin1(), dtDue().toString().latin1(),mRecurrenceID.toString().latin1() ); |
454 | setCompleted( false ); | 454 | setCompleted( false ); |
455 | qDebug("Todo::checkSetCompletedFalse++++++++++++++++++++++++++++ "); | 455 | qDebug("Todo::checkSetCompletedFalse "); |
456 | } | 456 | } |
457 | } | 457 | } |