summaryrefslogtreecommitdiffabout
path: root/libkcal/todo.cpp
authorzautrix <zautrix>2005-01-30 10:57:34 (UTC)
committer zautrix <zautrix>2005-01-30 10:57:34 (UTC)
commit446ea98a9f6550c4a3e64bcfc6aab8e8b58776e8 (patch) (unidiff)
tree26260551e87a4074651a5cdceee5e788f743a02d /libkcal/todo.cpp
parent949c6e28c83668176fd9c29e12668322c6ae627f (diff)
downloadkdepimpi-446ea98a9f6550c4a3e64bcfc6aab8e8b58776e8.zip
kdepimpi-446ea98a9f6550c4a3e64bcfc6aab8e8b58776e8.tar.gz
kdepimpi-446ea98a9f6550c4a3e64bcfc6aab8e8b58776e8.tar.bz2
bugs from last commit fixed
Diffstat (limited to 'libkcal/todo.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/todo.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp
index 7362bdf..7d04793 100644
--- a/libkcal/todo.cpp
+++ b/libkcal/todo.cpp
@@ -287,39 +287,40 @@ bool Todo::isCompleted() const
287 287
288void Todo::setCompleted(bool completed) 288void Todo::setCompleted(bool completed)
289{ 289{
290 if (completed) mPercentComplete = 100; 290 if (completed) mPercentComplete = 100;
291 else { 291 else {
292 mPercentComplete = 0; 292 mPercentComplete = 0;
293 mHasCompletedDate = false; 293 mHasCompletedDate = false;
294 } 294 }
295 updated(); 295 updated();
296} 296}
297 297
298QDateTime Todo::completed() const 298QDateTime Todo::completed() const
299{ 299{
300 return mCompleted; 300 return mCompleted;
301} 301}
302 302
303QString Todo::completedStr() const 303QString Todo::completedStr( bool shortF ) const
304{ 304{
305 return KGlobal::locale()->formatDateTime(mCompleted); 305 return KGlobal::locale()->formatDateTime(mCompleted, shortF);
306} 306}
307 307
308void Todo::setCompleted(const QDateTime &completed) 308void Todo::setCompleted(const QDateTime &completed)
309{ 309{
310 qDebug("Todo::setCompleted ");
310 mHasCompletedDate = true; 311 mHasCompletedDate = true;
311 mPercentComplete = 100; 312 mPercentComplete = 100;
312 mCompleted = getEvenTime(completed); 313 mCompleted = getEvenTime(completed);
313 updated(); 314 updated();
314} 315}
315 316
316bool Todo::hasCompletedDate() const 317bool Todo::hasCompletedDate() const
317{ 318{
318 return mHasCompletedDate; 319 return mHasCompletedDate;
319} 320}
320 321
321int Todo::percentComplete() const 322int Todo::percentComplete() const
322{ 323{
323 return mPercentComplete; 324 return mPercentComplete;
324} 325}
325 326