summaryrefslogtreecommitdiffstats
path: root/kresources
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-08-27 23:01:53 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-08-27 23:01:53 +0000
commitcfa6b4114cea52b167caaaeb417f98f83edd690f (patch)
tree5fb46adfe9f1caf37e2716e79b148176b09574ab /kresources
parenta3e46fcf743ccdac7c2461658898ca254bf64dd6 (diff)
downloadtdepim-cfa6b4114cea52b167caaaeb417f98f83edd690f.tar.gz
tdepim-cfa6b4114cea52b167caaaeb417f98f83edd690f.zip
Initial (i.e. read only) support for RECURRENCE-ID modified incidence series.
Write support requires further debugging and/or compliance checks with respect to Zimbra; there is no obvious reason why it should not be working but Zimbra fails with 409 when saving. User interface support is mostly complete, with event links being tracked across deletes. git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1168937 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kresources')
-rw-r--r--kresources/caldav/resource.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/kresources/caldav/resource.cpp b/kresources/caldav/resource.cpp
index 4e1542029..462cd6290 100644
--- a/kresources/caldav/resource.cpp
+++ b/kresources/caldav/resource.cpp
@@ -506,16 +506,24 @@ TQString ResourceCalDav::getICalString(const Incidence::List& inc) {
CalendarLocal loc(timeZoneId());
TQString data = "";
+ TQString header = "";
+ TQString footer = "";
ICalFormat ical;
+ // Get the iCal header and footer
+ header = ical.toString(&loc);
+ int location = header.find("END:VCALENDAR", 0, true);
+ footer = header.mid(location, 0xffffffff);
+ header.remove("END:VCALENDAR");
+
+ data = data + header;
// NOTE: This is very susceptible to invalid entries in added/changed/deletedIncidences
// Be very careful with clearChange/clearChanges, and be sure to clear after load and save...
for(Incidence::List::ConstIterator it = inc.constBegin(); it != inc.constEnd(); ++it) {
Incidence *i = (*it)->clone();
- loc.addIncidence(i);
+ data = data + ical.toString(i, &mCalendar);
}
-
- data = ical.toString(&loc);
+ data = data + footer;
return data;
}