-rw-r--r-- | libkcal/todo.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp index 29f725f..2201814 100644 --- a/libkcal/todo.cpp +++ b/libkcal/todo.cpp | |||
@@ -106,8 +106,9 @@ void Todo::setRunning( bool run ) | |||
106 | } else { | 106 | } else { |
107 | mRunSaveTimer->stop(); | 107 | mRunSaveTimer->stop(); |
108 | saveRunningInfoToFile(); | 108 | saveRunningInfoToFile(); |
109 | } | 109 | } |
110 | mLastSavedFileName = ""; | ||
110 | } | 111 | } |
111 | void Todo::saveRunningInfo( QString comment, QDateTime start, QDateTime end ) | 112 | void Todo::saveRunningInfo( QString comment, QDateTime start, QDateTime end ) |
112 | { | 113 | { |
113 | if ( !mRunning) return; | 114 | if ( !mRunning) return; |
@@ -189,8 +190,14 @@ void Todo::saveRunningInfoToFile( QString comment ) | |||
189 | ICalFormat format( false ); | 190 | ICalFormat format( false ); |
190 | file = dir +"/" +file +".ics"; | 191 | file = dir +"/" +file +".ics"; |
191 | format.save( &cal, file ); | 192 | format.save( &cal, file ); |
192 | saveParents(); | 193 | saveParents(); |
194 | if ( !mLastSavedFileName.isEmpty() ) { | ||
195 | if ( mLastSavedFileName != file ) { | ||
196 | QFile::remove( mLastSavedFileName ); | ||
197 | } | ||
198 | } | ||
199 | mLastSavedFileName = file; | ||
193 | #ifndef DESKTOP_VERSION | 200 | #ifndef DESKTOP_VERSION |
194 | //QPEApplication::setTempScreenSaverMode ( QPEApplication::Enable ); | 201 | //QPEApplication::setTempScreenSaverMode ( QPEApplication::Enable ); |
195 | #endif | 202 | #endif |
196 | } | 203 | } |