author | zautrix <zautrix> | 2005-07-28 10:38:58 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-28 10:38:58 (UTC) |
commit | fee4c893fe8fd01af1b55c1ccd40213fc18a36b4 (patch) (side-by-side diff) | |
tree | 83a3018d54d60e880d441a6f91ef8fe54254aaff /libkcal/todo.cpp | |
parent | 27ffa2e08ebb38e71f613af3a214750442418e2c (diff) | |
download | kdepimpi-fee4c893fe8fd01af1b55c1ccd40213fc18a36b4.zip kdepimpi-fee4c893fe8fd01af1b55c1ccd40213fc18a36b4.tar.gz kdepimpi-fee4c893fe8fd01af1b55c1ccd40213fc18a36b4.tar.bz2 |
fixxxx
-rw-r--r-- | libkcal/todo.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp index 7bf756a..e4508a0 100644 --- a/libkcal/todo.cpp +++ b/libkcal/todo.cpp @@ -601,16 +601,26 @@ void Todo::checkSetCompletedFalse() { if ( !mHasRecurrenceID ) { qDebug("ERROR 1 in Todo::checkSetCompletedFalse"); return; } // qDebug("Todo::checkSetCompletedFalse()"); //qDebug("%s %s %s ",mDtStart.toString().latin1(), dtDue().toString().latin1(),mRecurrenceID.toString().latin1() ); 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 "); } } } +QString Todo::durationText() +{ + if ( mHasDueDate && hasStartDate() ) { + int sec = dtStart().secsTo( dtDue() ); + if ( doesFloat() ) + sec += 86400; + return durationText4Time( sec ); + } + return "---"; +} |