-rw-r--r-- | libkcal/icalformatimpl.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/libkcal/icalformatimpl.cpp b/libkcal/icalformatimpl.cpp index 4794bc9..f349681 100644 --- a/libkcal/icalformatimpl.cpp +++ b/libkcal/icalformatimpl.cpp | |||
@@ -371,21 +371,18 @@ void ICalFormatImpl::writeIncidence(icalcomponent *parent,Incidence *incidence) | |||
371 | incidence->relatedToUid().utf8())); | 371 | incidence->relatedToUid().utf8())); |
372 | } | 372 | } |
373 | 373 | ||
374 | // recurrence rule stuff | 374 | // recurrence rule stuff |
375 | Recurrence *recur = incidence->recurrence(); | 375 | if (incidence->doesRecur()) { |
376 | if (recur->doesRecur()) { | 376 | icalcomponent_add_property(parent,writeRecurrenceRule(incidence->recurrence())); |
377 | |||
378 | icalcomponent_add_property(parent,writeRecurrenceRule(recur)); | ||
379 | } | ||
380 | |||
381 | // recurrence excpetion dates | 377 | // recurrence excpetion dates |
382 | DateList dateList = incidence->exDates(); | 378 | DateList dateList = incidence->exDates(); |
383 | DateList::ConstIterator exIt; | 379 | DateList::ConstIterator exIt; |
384 | for(exIt = dateList.begin(); exIt != dateList.end(); ++exIt) { | 380 | for(exIt = dateList.begin(); exIt != dateList.end(); ++exIt) { |
385 | icalcomponent_add_property(parent,icalproperty_new_exdate( | 381 | icalcomponent_add_property(parent,icalproperty_new_exdate( |
386 | writeICalDate(*exIt))); | 382 | writeICalDate(*exIt))); |
387 | } | 383 | } |
384 | } | ||
388 | 385 | ||
389 | // attachments | 386 | // attachments |
390 | QPtrList<Attachment> attachments = incidence->attachments(); | 387 | QPtrList<Attachment> attachments = incidence->attachments(); |
391 | for (Attachment *at = attachments.first(); at; at = attachments.next()) | 388 | for (Attachment *at = attachments.first(); at; at = attachments.next()) |
@@ -1294,8 +1291,9 @@ void ICalFormatImpl::readIncidence(icalcomponent *parent,Incidence *incidence) | |||
1294 | incidence->setIDStr(kp); | 1291 | incidence->setIDStr(kp); |
1295 | } | 1292 | } |
1296 | 1293 | ||
1297 | // Cancel backwards compatibility mode for subsequent changes by the application | 1294 | // Cancel backwards compatibility mode for subsequent changes by the application |
1295 | if ( readrec ) | ||
1298 | incidence->recurrence()->setCompatVersion(); | 1296 | incidence->recurrence()->setCompatVersion(); |
1299 | 1297 | ||
1300 | // add categories | 1298 | // add categories |
1301 | incidence->setCategories(categories); | 1299 | incidence->setCategories(categories); |