-rw-r--r-- | libkcal/todo.cpp | 2 | ||||
-rw-r--r-- | libkcal/todo.h | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp index 62b74f1..9a8b6e4 100644 --- a/libkcal/todo.cpp +++ b/libkcal/todo.cpp @@ -96,8 +96,10 @@ void Todo::setRunning( bool run ) } } void Todo::saveRunningInfo( QString comment, QDateTime start, QDateTime end ) { + if ( !mRunning) return; + mRunning = false; mRunStart = start; mRunEnd = end; saveRunningInfoToFile( comment ); } diff --git a/libkcal/todo.h b/libkcal/todo.h index 11f848e..425dfad 100644 --- a/libkcal/todo.h +++ b/libkcal/todo.h @@ -41,9 +41,8 @@ namespace KCal { ~Todo(); typedef ListBase<Todo> List; QCString type() const { return "Todo"; } IncTypeID typeID() const { return todoID; } - void saveRunningInfo( QString comment, QDateTime start, QDateTime end ); /** Return an exact copy of this todo. */ Incidence *clone(); QDateTime getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_dt ) const; @@ -125,8 +124,9 @@ namespace KCal { void setRunningFalse( QString ); void stopRunning(); int runTime(); QDateTime runStart () const { return mRunStart;} + void saveRunningInfo( QString comment, QDateTime start, QDateTime end ); public slots: void saveRunningInfoToFile( QString st ); void saveRunningInfoToFile( ); void saveParents(); |