summaryrefslogtreecommitdiffabout
path: root/libkcal/incidencebase.cpp
Side-by-side diff
Diffstat (limited to 'libkcal/incidencebase.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/incidencebase.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/libkcal/incidencebase.cpp b/libkcal/incidencebase.cpp
index 1e99082..b5fe2e6 100644
--- a/libkcal/incidencebase.cpp
+++ b/libkcal/incidencebase.cpp
@@ -183,49 +183,51 @@ 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
{
- 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();
}
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);