author | zautrix <zautrix> | 2005-10-22 15:25:31 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-10-22 15:25:31 (UTC) |
commit | a29a801e5500a8e5994afc317229698aeebe22e9 (patch) (unidiff) | |
tree | defdd25623ca6908e712ed41c0d30007cb96c439 | |
parent | 30550b912b291ccedc8ab100004ba8c5ed216097 (diff) | |
download | kdepimpi-a29a801e5500a8e5994afc317229698aeebe22e9.zip kdepimpi-a29a801e5500a8e5994afc317229698aeebe22e9.tar.gz kdepimpi-a29a801e5500a8e5994afc317229698aeebe22e9.tar.bz2 |
fixx
-rw-r--r-- | libkcal/todo.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp index 2201814..cc1c5ae 100644 --- a/libkcal/todo.cpp +++ b/libkcal/todo.cpp | |||
@@ -103,24 +103,26 @@ void Todo::setRunning( bool run ) | |||
103 | if ( mRunning ) { | 103 | if ( mRunning ) { |
104 | restartSaveTimer( SAVETIMER_TIMEOUT_SECONDS ); | 104 | restartSaveTimer( SAVETIMER_TIMEOUT_SECONDS ); |
105 | mRunStart = QDateTime::currentDateTime(); | 105 | mRunStart = QDateTime::currentDateTime(); |
106 | } else { | 106 | } else { |
107 | mRunSaveTimer->stop(); | 107 | mRunSaveTimer->stop(); |
108 | saveRunningInfoToFile(); | 108 | saveRunningInfoToFile(); |
109 | } | 109 | } |
110 | mLastSavedFileName = ""; | 110 | mLastSavedFileName = ""; |
111 | } | 111 | } |
112 | void Todo::saveRunningInfo( QString comment, QDateTime start, QDateTime end ) | 112 | void Todo::saveRunningInfo( QString comment, QDateTime start, QDateTime end ) |
113 | { | 113 | { |
114 | if ( !mRunning) return; | 114 | if ( !mRunning) return; |
115 | if ( mRunSaveTimer ) | ||
116 | mRunSaveTimer->stop(); | ||
115 | mRunning = false; | 117 | mRunning = false; |
116 | mRunStart = start; | 118 | mRunStart = start; |
117 | mRunEnd = end; | 119 | mRunEnd = end; |
118 | saveRunningInfoToFile( comment ); | 120 | saveRunningInfoToFile( comment ); |
119 | } | 121 | } |
120 | void Todo::restartSaveTimer( int secs ) | 122 | void Todo::restartSaveTimer( int secs ) |
121 | { | 123 | { |
122 | mRunSaveTimer->start( secs * 1000 ); | 124 | mRunSaveTimer->start( secs * 1000 ); |
123 | mRunLastSave = QDateTime::currentDateTime(); | 125 | mRunLastSave = QDateTime::currentDateTime(); |
124 | mCurrentTimerDelay = secs; | 126 | mCurrentTimerDelay = secs; |
125 | } | 127 | } |
126 | void Todo::timerSlotSaveRunningInfoToFile() | 128 | void Todo::timerSlotSaveRunningInfoToFile() |