summaryrefslogtreecommitdiffabout
path: root/libkcal/todo.cpp
authorzautrix <zautrix>2005-09-28 00:42:41 (UTC)
committer zautrix <zautrix>2005-09-28 00:42:41 (UTC)
commit4fb9beb1ec26f37a18f98af9d3b6b59acf8c56d2 (patch) (side-by-side diff)
treecbfbb81858c5ec08ba16e45b511ddbab539af864 /libkcal/todo.cpp
parente6112c5497b334d6dc38108b37963c5e803413d3 (diff)
downloadkdepimpi-4fb9beb1ec26f37a18f98af9d3b6b59acf8c56d2.zip
kdepimpi-4fb9beb1ec26f37a18f98af9d3b6b59acf8c56d2.tar.gz
kdepimpi-4fb9beb1ec26f37a18f98af9d3b6b59acf8c56d2.tar.bz2
save tt fix
Diffstat (limited to 'libkcal/todo.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/todo.cpp7
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
@@ -107,6 +107,7 @@ void Todo::setRunning( bool run )
mRunSaveTimer->stop();
saveRunningInfoToFile();
}
+ mLastSavedFileName = "";
}
void Todo::saveRunningInfo( QString comment, QDateTime start, QDateTime end )
{
@@ -190,6 +191,12 @@ void Todo::saveRunningInfoToFile( QString comment )
file = dir +"/" +file +".ics";
format.save( &cal, file );
saveParents();
+ if ( !mLastSavedFileName.isEmpty() ) {
+ if ( mLastSavedFileName != file ) {
+ QFile::remove( mLastSavedFileName );
+ }
+ }
+ mLastSavedFileName = file;
#ifndef DESKTOP_VERSION
//QPEApplication::setTempScreenSaverMode ( QPEApplication::Enable );
#endif