author | zautrix <zautrix> | 2005-07-27 22:26:08 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-27 22:26:08 (UTC) |
commit | 0e38cffd7ba745f237c659e1c48080fcb25b126c (patch) (side-by-side diff) | |
tree | 6069600e18bae5300c6ce427735457dbfed93141 /libkcal/icalformatimpl.cpp | |
parent | 136f9082862e7a56abb3a201e96f5e7386c4f1b9 (diff) | |
download | kdepimpi-0e38cffd7ba745f237c659e1c48080fcb25b126c.zip kdepimpi-0e38cffd7ba745f237c659e1c48080fcb25b126c.tar.gz kdepimpi-0e38cffd7ba745f237c659e1c48080fcb25b126c.tar.bz2 |
rec changes
-rw-r--r-- | libkcal/icalformatimpl.cpp | 24 |
1 files changed, 11 insertions, 13 deletions
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); |