-rw-r--r-- | libkcal/todo.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp index 002d3f2..f7e38a7 100644 --- a/libkcal/todo.cpp +++ b/libkcal/todo.cpp @@ -62,4 +62,12 @@ Todo::~Todo() } +void Todo::setRunningFalse( QString s ) +{ + if ( ! mRunning ) + return; + mRunning = false; + mRunSaveTimer->stop(); + saveRunningInfoToFile( s ); +} void Todo::setRunning( bool run ) { @@ -81,5 +89,5 @@ void Todo::setRunning( bool run ) } -void Todo::saveRunningInfoToFile() +void Todo::saveRunningInfoToFile( QString comment ) { //qDebug("Todo::saveRunningInfoToFile() %s", summary().latin1()); @@ -104,4 +112,7 @@ void Todo::saveRunningInfoToFile() to->setHasDueDate( true ); to->setUid( file ); + if ( !comment.isEmpty() ) { + to->setDescription( comment ); + } cal.addIncidence( to ); ICalFormat format; |