-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 | |||
@@ -367,29 +367,26 @@ void ICalFormatImpl::writeIncidence(icalcomponent *parent,Incidence *incidence) | |||
367 | 367 | ||
368 | // related event | 368 | // related event |
369 | if (!incidence->relatedToUid().isEmpty()) { | 369 | if (!incidence->relatedToUid().isEmpty()) { |
370 | icalcomponent_add_property(parent,icalproperty_new_relatedto( | 370 | icalcomponent_add_property(parent,icalproperty_new_relatedto( |
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()) |
392 | icalcomponent_add_property(parent,writeAttachment(at)); | 389 | icalcomponent_add_property(parent,writeAttachment(at)); |
393 | 390 | ||
394 | // alarms | 391 | // alarms |
395 | QPtrList<Alarm> alarms = incidence->alarms(); | 392 | QPtrList<Alarm> alarms = incidence->alarms(); |
@@ -1290,16 +1287,17 @@ void ICalFormatImpl::readIncidence(icalcomponent *parent,Incidence *incidence) | |||
1290 | 1287 | ||
1291 | 1288 | ||
1292 | kp = incidence->nonKDECustomProperty("X-KOPIEXTID"); | 1289 | kp = incidence->nonKDECustomProperty("X-KOPIEXTID"); |
1293 | if (!kp.isNull()) { | 1290 | if (!kp.isNull()) { |
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); |
1302 | 1300 | ||
1303 | // iterate through all alarms | 1301 | // iterate through all alarms |
1304 | for (icalcomponent *alarm = icalcomponent_get_first_component(parent,ICAL_VALARM_COMPONENT); | 1302 | for (icalcomponent *alarm = icalcomponent_get_first_component(parent,ICAL_VALARM_COMPONENT); |
1305 | alarm; | 1303 | alarm; |