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 /libkcal/incidencebase.cpp | |
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 | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libkcal/incidencebase.cpp b/libkcal/incidencebase.cpp index 1e99082..b5fe2e6 100644 --- a/libkcal/incidencebase.cpp +++ b/libkcal/incidencebase.cpp @@ -159,96 +159,98 @@ QDateTime IncidenceBase::lastModified() const void IncidenceBase::setOrganizer(const QString &o) { // we don't check for readonly here, because it is // possible that by setting the organizer we are changing // the event's readonly status... mOrganizer = o; if (mOrganizer.left(7).upper() == "MAILTO:") mOrganizer = mOrganizer.remove(0,7); updated(); } QString IncidenceBase::organizer() const { return mOrganizer; } void IncidenceBase::setReadOnly( bool readOnly ) { mReadOnly = readOnly; } void IncidenceBase::setDtStart(const QDateTime &dtStart) { // if (mReadOnly) return; mDtStart = getEvenTime(dtStart); updated(); } 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 { + 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(); } bool IncidenceBase::addAttendee(Attendee *a, bool doupdate) { if (mReadOnly) return false; if (a->name().left(7).upper() == "MAILTO:") a->setName(a->name().remove(0,7)); QPtrListIterator<Attendee> qli(mAttendees); qli.toFirst(); while (qli) { if (*qli.current() == *a) return false; ++qli; } mAttendees.append(a); if (doupdate) updated(); return true; } #if 0 void IncidenceBase::removeAttendee(Attendee *a) { if (mReadOnly) return; mAttendees.removeRef(a); updated(); } void IncidenceBase::removeAttendee(const char *n) { Attendee *a; |