From 0e38cffd7ba745f237c659e1c48080fcb25b126c Mon Sep 17 00:00:00 2001 From: zautrix Date: Wed, 27 Jul 2005 22:26:08 +0000 Subject: rec changes --- (limited to 'libkcal/icalformatimpl.cpp') diff --git a/libkcal/icalformatimpl.cpp b/libkcal/icalformatimpl.cpp index 4794bc9..f349681 100644 --- a/libkcal/icalformatimpl.cpp +++ b/libkcal/icalformatimpl.cpp @@ -372,18 +372,15 @@ void ICalFormatImpl::writeIncidence(icalcomponent *parent,Incidence *incidence) } // recurrence rule stuff - Recurrence *recur = incidence->recurrence(); - if (recur->doesRecur()) { - - icalcomponent_add_property(parent,writeRecurrenceRule(recur)); - } - - // recurrence excpetion dates - DateList dateList = incidence->exDates(); - DateList::ConstIterator exIt; - for(exIt = dateList.begin(); exIt != dateList.end(); ++exIt) { - icalcomponent_add_property(parent,icalproperty_new_exdate( - writeICalDate(*exIt))); + if (incidence->doesRecur()) { + icalcomponent_add_property(parent,writeRecurrenceRule(incidence->recurrence())); + // recurrence excpetion dates + DateList dateList = incidence->exDates(); + DateList::ConstIterator exIt; + for(exIt = dateList.begin(); exIt != dateList.end(); ++exIt) { + icalcomponent_add_property(parent,icalproperty_new_exdate( + writeICalDate(*exIt))); + } } // attachments @@ -1295,7 +1292,8 @@ void ICalFormatImpl::readIncidence(icalcomponent *parent,Incidence *incidence) } // Cancel backwards compatibility mode for subsequent changes by the application - incidence->recurrence()->setCompatVersion(); + if ( readrec ) + incidence->recurrence()->setCompatVersion(); // add categories incidence->setCategories(categories); -- cgit v0.9.0.2