summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/todo.cpp7
-rw-r--r--libkcal/todo.h1
2 files changed, 8 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
@@ -109,2 +109,3 @@ void Todo::setRunning( bool run )
}
+ mLastSavedFileName = "";
}
@@ -192,2 +193,8 @@ void Todo::saveRunningInfoToFile( QString comment )
saveParents();
+ if ( !mLastSavedFileName.isEmpty() ) {
+ if ( mLastSavedFileName != file ) {
+ QFile::remove( mLastSavedFileName );
+ }
+ }
+ mLastSavedFileName = file;
#ifndef DESKTOP_VERSION
diff --git a/libkcal/todo.h b/libkcal/todo.h
index 71b7a4e..2131732 100644
--- a/libkcal/todo.h
+++ b/libkcal/todo.h
@@ -136,2 +136,3 @@ namespace KCal {
private:
+ QString mLastSavedFileName;
void restartSaveTimer( int secs );