author | zautrix <zautrix> | 2005-03-07 18:08:51 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-03-07 18:08:51 (UTC) |
commit | 668f49ee87c1b3b51e103ed8bb570a035c96b546 (patch) (side-by-side diff) | |
tree | 9310b2a5f19589641c7bab924e87599c021141a1 | |
parent | 55c82dcc9b3c04c06b4eb73654d2b7f09a2e502c (diff) | |
download | kdepimpi-668f49ee87c1b3b51e103ed8bb570a035c96b546.zip kdepimpi-668f49ee87c1b3b51e103ed8bb570a035c96b546.tar.gz kdepimpi-668f49ee87c1b3b51e103ed8bb570a035c96b546.tar.bz2 |
start datetime fix for float
-rw-r--r-- | libkcal/incidencebase.cpp | 4 | ||||
-rw-r--r-- | libkcal/todo.cpp | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/libkcal/incidencebase.cpp b/libkcal/incidencebase.cpp index 1e99082..b5fe2e6 100644 --- a/libkcal/incidencebase.cpp +++ b/libkcal/incidencebase.cpp @@ -191,33 +191,35 @@ QDateTime IncidenceBase::dtStart() const { return mDtStart; } QString IncidenceBase::dtStartTimeStr() const { return KGlobal::locale()->formatTime(dtStart().time()); } QString IncidenceBase::dtStartDateStr(bool shortfmt) const { return KGlobal::locale()->formatDate(dtStart().date(),shortfmt); } QString IncidenceBase::dtStartStr(bool shortfmt) const { - return KGlobal::locale()->formatDateTime(dtStart(), shortfmt); + if ( doesFloat() ) + return KGlobal::locale()->formatDate(dtStart().date(),shortfmt); + return KGlobal::locale()->formatDateTime(dtStart(), shortfmt); } bool IncidenceBase::doesFloat() const { return mFloats; } void IncidenceBase::setFloats(bool f) { if (mReadOnly) return; mFloats = f; updated(); } diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp index 39d16b6..a496404 100644 --- a/libkcal/todo.cpp +++ b/libkcal/todo.cpp @@ -178,33 +178,35 @@ QDateTime Todo::dtDue() const { return mDtDue; } QString Todo::dtDueTimeStr() const { return KGlobal::locale()->formatTime(mDtDue.time()); } QString Todo::dtDueDateStr(bool shortfmt) const { return KGlobal::locale()->formatDate(mDtDue.date(),shortfmt); } QString Todo::dtDueStr(bool shortfmt) const { - return KGlobal::locale()->formatDateTime(mDtDue, shortfmt); + if ( doesFloat() ) + return KGlobal::locale()->formatDate(mDtDue.date(),shortfmt); + return KGlobal::locale()->formatDateTime(mDtDue, shortfmt); } // retval 0 : no found // 1 : due for date found // 2 : overdue for date found int Todo::hasDueSubTodoForDate( const QDate & date, bool checkSubtodos ) { int retval = 0; if ( isCompleted() ) return 0; if ( hasDueDate() ) { if ( dtDue().date() < date ) return 2; // we do not return, because we may find an overdue sub todo if ( dtDue().date() == date ) retval = 1; } |