summaryrefslogtreecommitdiffabout
Unidiff
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
@@ -107,6 +107,7 @@ void Todo::setRunning( bool run )
107 mRunSaveTimer->stop(); 107 mRunSaveTimer->stop();
108 saveRunningInfoToFile(); 108 saveRunningInfoToFile();
109 } 109 }
110 mLastSavedFileName = "";
110} 111}
111void Todo::saveRunningInfo( QString comment, QDateTime start, QDateTime end ) 112void Todo::saveRunningInfo( QString comment, QDateTime start, QDateTime end )
112{ 113{
@@ -190,6 +191,12 @@ void Todo::saveRunningInfoToFile( QString comment )
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
diff --git a/libkcal/todo.h b/libkcal/todo.h
index 71b7a4e..2131732 100644
--- a/libkcal/todo.h
+++ b/libkcal/todo.h
@@ -134,6 +134,7 @@ namespace KCal {
134 private slots: 134 private slots:
135 void timerSlotSaveRunningInfoToFile( ); 135 void timerSlotSaveRunningInfoToFile( );
136 private: 136 private:
137 QString mLastSavedFileName;
137 void restartSaveTimer( int secs ); 138 void restartSaveTimer( int secs );
138 int mCurrentTimerDelay; 139 int mCurrentTimerDelay;
139 bool mRunning; 140 bool mRunning;