-rw-r--r-- | libkcal/todo.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp index 7d04793..7f1de78 100644 --- a/libkcal/todo.cpp +++ b/libkcal/todo.cpp | |||
@@ -294,33 +294,37 @@ void Todo::setCompleted(bool completed) | |||
294 | } | 294 | } |
295 | updated(); | 295 | updated(); |
296 | } | 296 | } |
297 | 297 | ||
298 | QDateTime Todo::completed() const | 298 | QDateTime Todo::completed() const |
299 | { | 299 | { |
300 | return mCompleted; | 300 | return mCompleted; |
301 | } | 301 | } |
302 | 302 | ||
303 | QString Todo::completedStr( bool shortF ) const | 303 | QString Todo::completedStr( bool shortF ) const |
304 | { | 304 | { |
305 | return KGlobal::locale()->formatDateTime(mCompleted, shortF); | 305 | return KGlobal::locale()->formatDateTime(mCompleted, shortF); |
306 | } | 306 | } |
307 | 307 | ||
308 | void Todo::setCompleted(const QDateTime &completed) | 308 | void Todo::setCompleted(const QDateTime &completed) |
309 | { | 309 | { |
310 | qDebug("Todo::setCompleted "); | 310 | //qDebug("Todo::setCompleted "); |
311 | if ( mHasCompletedDate ) { | ||
312 | // qDebug("has completed data - return "); | ||
313 | return; | ||
314 | } | ||
311 | mHasCompletedDate = true; | 315 | mHasCompletedDate = true; |
312 | mPercentComplete = 100; | 316 | mPercentComplete = 100; |
313 | mCompleted = getEvenTime(completed); | 317 | mCompleted = getEvenTime(completed); |
314 | updated(); | 318 | updated(); |
315 | } | 319 | } |
316 | 320 | ||
317 | bool Todo::hasCompletedDate() const | 321 | bool Todo::hasCompletedDate() const |
318 | { | 322 | { |
319 | return mHasCompletedDate; | 323 | return mHasCompletedDate; |
320 | } | 324 | } |
321 | 325 | ||
322 | int Todo::percentComplete() const | 326 | int Todo::percentComplete() const |
323 | { | 327 | { |
324 | return mPercentComplete; | 328 | return mPercentComplete; |
325 | } | 329 | } |
326 | 330 | ||