-rw-r--r-- | libkcal/incidencebase.cpp | 4 |
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) | |||
183 | { | 183 | { |
184 | // if (mReadOnly) return; | 184 | // if (mReadOnly) return; |
185 | mDtStart = getEvenTime(dtStart); | 185 | mDtStart = getEvenTime(dtStart); |
186 | updated(); | 186 | updated(); |
187 | } | 187 | } |
188 | 188 | ||
189 | 189 | ||
190 | QDateTime IncidenceBase::dtStart() const | 190 | QDateTime IncidenceBase::dtStart() const |
191 | { | 191 | { |
192 | return mDtStart; | 192 | return mDtStart; |
193 | } | 193 | } |
194 | 194 | ||
195 | QString IncidenceBase::dtStartTimeStr() const | 195 | QString IncidenceBase::dtStartTimeStr() const |
196 | { | 196 | { |
197 | return KGlobal::locale()->formatTime(dtStart().time()); | 197 | return KGlobal::locale()->formatTime(dtStart().time()); |
198 | } | 198 | } |
199 | 199 | ||
200 | QString IncidenceBase::dtStartDateStr(bool shortfmt) const | 200 | QString IncidenceBase::dtStartDateStr(bool shortfmt) const |
201 | { | 201 | { |
202 | return KGlobal::locale()->formatDate(dtStart().date(),shortfmt); | 202 | return KGlobal::locale()->formatDate(dtStart().date(),shortfmt); |
203 | } | 203 | } |
204 | 204 | ||
205 | QString IncidenceBase::dtStartStr(bool shortfmt) const | 205 | QString IncidenceBase::dtStartStr(bool shortfmt) const |
206 | { | 206 | { |
207 | return KGlobal::locale()->formatDateTime(dtStart(), shortfmt); | 207 | if ( doesFloat() ) |
208 | return KGlobal::locale()->formatDate(dtStart().date(),shortfmt); | ||
209 | return KGlobal::locale()->formatDateTime(dtStart(), shortfmt); | ||
208 | } | 210 | } |
209 | 211 | ||
210 | 212 | ||
211 | bool IncidenceBase::doesFloat() const | 213 | bool IncidenceBase::doesFloat() const |
212 | { | 214 | { |
213 | return mFloats; | 215 | return mFloats; |
214 | } | 216 | } |
215 | 217 | ||
216 | void IncidenceBase::setFloats(bool f) | 218 | void IncidenceBase::setFloats(bool f) |
217 | { | 219 | { |
218 | if (mReadOnly) return; | 220 | if (mReadOnly) return; |
219 | mFloats = f; | 221 | mFloats = f; |
220 | updated(); | 222 | updated(); |
221 | } | 223 | } |
222 | 224 | ||
223 | 225 | ||
224 | bool IncidenceBase::addAttendee(Attendee *a, bool doupdate) | 226 | bool IncidenceBase::addAttendee(Attendee *a, bool doupdate) |
225 | { | 227 | { |
226 | if (mReadOnly) return false; | 228 | if (mReadOnly) return false; |
227 | if (a->name().left(7).upper() == "MAILTO:") | 229 | if (a->name().left(7).upper() == "MAILTO:") |
228 | a->setName(a->name().remove(0,7)); | 230 | a->setName(a->name().remove(0,7)); |
229 | 231 | ||
230 | QPtrListIterator<Attendee> qli(mAttendees); | 232 | QPtrListIterator<Attendee> qli(mAttendees); |
231 | 233 | ||