From 4fb9beb1ec26f37a18f98af9d3b6b59acf8c56d2 Mon Sep 17 00:00:00 2001 From: zautrix Date: Wed, 28 Sep 2005 00:42:41 +0000 Subject: save tt fix --- (limited to 'libkcal/todo.cpp') 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 -- cgit v0.9.0.2