author | zautrix <zautrix> | 2005-09-25 02:28:24 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-09-25 02:28:24 (UTC) |
commit | fa126dfea03b4ebed9a4eed4f2104f93abb72e22 (patch) (unidiff) | |
tree | dab730835ae807e407b928623a85294558d756cb /libkcal | |
parent | 3bbc14431e854bc3d8870b5ba12d64f6e1af6eb6 (diff) | |
download | kdepimpi-fa126dfea03b4ebed9a4eed4f2104f93abb72e22.zip kdepimpi-fa126dfea03b4ebed9a4eed4f2104f93abb72e22.tar.gz kdepimpi-fa126dfea03b4ebed9a4eed4f2104f93abb72e22.tar.bz2 |
todo timer fix
-rw-r--r-- | libkcal/todo.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp index 70a7711..29f725f 100644 --- a/libkcal/todo.cpp +++ b/libkcal/todo.cpp | |||
@@ -146,25 +146,25 @@ void Todo::timerSlotSaveRunningInfoToFile() | |||
146 | } | 146 | } |
147 | restartSaveTimer( SAVETIMER_TIMEOUT_SECONDS ); | 147 | restartSaveTimer( SAVETIMER_TIMEOUT_SECONDS ); |
148 | saveRunningInfoToFile( QString::null ); | 148 | saveRunningInfoToFile( QString::null ); |
149 | } | 149 | } |
150 | void Todo::saveRunningInfoToFile() | 150 | void Todo::saveRunningInfoToFile() |
151 | { | 151 | { |
152 | mRunEnd = QDateTime::currentDateTime(); | 152 | mRunEnd = QDateTime::currentDateTime(); |
153 | saveRunningInfoToFile( QString::null ); | 153 | saveRunningInfoToFile( QString::null ); |
154 | } | 154 | } |
155 | void Todo::saveRunningInfoToFile( QString comment ) | 155 | void Todo::saveRunningInfoToFile( QString comment ) |
156 | { | 156 | { |
157 | #ifndef DESKTOP_VERSION | 157 | #ifndef DESKTOP_VERSION |
158 | QPEApplication::setTempScreenSaverMode ( QPEApplication::Disable ); | 158 | //QPEApplication::setTempScreenSaverMode ( QPEApplication::Disable ); |
159 | #endif | 159 | #endif |
160 | //qDebug("Todo::saveRunningInfoToFile() %s", summary().latin1()); | 160 | //qDebug("Todo::saveRunningInfoToFile() %s", summary().latin1()); |
161 | if ( mRunStart.secsTo ( mRunEnd) < 15 ) { | 161 | if ( mRunStart.secsTo ( mRunEnd) < 15 ) { |
162 | qDebug("Running time < 15 seconds. Skipped. "); | 162 | qDebug("Running time < 15 seconds. Skipped. "); |
163 | return; | 163 | return; |
164 | } | 164 | } |
165 | QString dir = KGlobalSettings::timeTrackerDir(); | 165 | QString dir = KGlobalSettings::timeTrackerDir(); |
166 | //qDebug("%s ", dir.latin1()); | 166 | //qDebug("%s ", dir.latin1()); |
167 | QString file = "%1%2%3-%4%5%6-"; | 167 | QString file = "%1%2%3-%4%5%6-"; |
168 | file = file.arg( mRunStart.date().year(), 4).arg( mRunStart.date().month(),2 ).arg( mRunStart.date().day(), 2 ).arg( mRunStart.time().hour(),2 ).arg( mRunStart.time().minute(),2 ).arg( mRunStart.time().second(),2 ); | 168 | file = file.arg( mRunStart.date().year(), 4).arg( mRunStart.date().month(),2 ).arg( mRunStart.date().day(), 2 ).arg( mRunStart.time().hour(),2 ).arg( mRunStart.time().minute(),2 ).arg( mRunStart.time().second(),2 ); |
169 | file.replace ( QRegExp (" "), "0" ); | 169 | file.replace ( QRegExp (" "), "0" ); |
170 | file += uid(); | 170 | file += uid(); |
@@ -182,25 +182,25 @@ void Todo::saveRunningInfoToFile( QString comment ) | |||
182 | QString des = to->description(); | 182 | QString des = to->description(); |
183 | if ( des.isEmpty () ) | 183 | if ( des.isEmpty () ) |
184 | to->setDescription( "TT-Note: " + comment ); | 184 | to->setDescription( "TT-Note: " + comment ); |
185 | else | 185 | else |
186 | to->setDescription( "TT-Note: " + comment +"\n" + des ); | 186 | to->setDescription( "TT-Note: " + comment +"\n" + des ); |
187 | } | 187 | } |
188 | cal.addIncidence( to ); | 188 | cal.addIncidence( to ); |
189 | ICalFormat format( false ); | 189 | ICalFormat format( false ); |
190 | file = dir +"/" +file +".ics"; | 190 | file = dir +"/" +file +".ics"; |
191 | format.save( &cal, file ); | 191 | format.save( &cal, file ); |
192 | saveParents(); | 192 | saveParents(); |
193 | #ifndef DESKTOP_VERSION | 193 | #ifndef DESKTOP_VERSION |
194 | QPEApplication::setTempScreenSaverMode ( QPEApplication::Enable ); | 194 | //QPEApplication::setTempScreenSaverMode ( QPEApplication::Enable ); |
195 | #endif | 195 | #endif |
196 | } | 196 | } |
197 | void Todo::saveParents() | 197 | void Todo::saveParents() |
198 | { | 198 | { |
199 | if (!relatedTo() ) | 199 | if (!relatedTo() ) |
200 | return; | 200 | return; |
201 | Incidence * inc = relatedTo(); | 201 | Incidence * inc = relatedTo(); |
202 | if ( inc->typeID() != todoID ) | 202 | if ( inc->typeID() != todoID ) |
203 | return; | 203 | return; |
204 | Todo* to = (Todo*)inc; | 204 | Todo* to = (Todo*)inc; |
205 | bool saveTodo = false; | 205 | bool saveTodo = false; |
206 | QString file = KGlobalSettings::timeTrackerDir() + "/"+ to->uid() + ".ics"; | 206 | QString file = KGlobalSettings::timeTrackerDir() + "/"+ to->uid() + ".ics"; |