summaryrefslogtreecommitdiffstats
path: root/libkcal/resourcecached.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-08-28 21:36:58 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-08-28 21:36:58 +0000
commit5abbdb459be7870848ef16691174e91c68958304 (patch)
tree1fb80e5febb13f0a82e97f2200f51ebeaff22d61 /libkcal/resourcecached.cpp
parentba9ae64c036bad58a9d9f6ca49986913d44502d9 (diff)
downloadtdepim-5abbdb459be7870848ef16691174e91c68958304.tar.gz
tdepim-5abbdb459be7870848ef16691174e91c68958304.zip
* Fixed CalDAV resource error messages and potential crash
* Added write support to events with RECURRENCE-ID property Only remaining potential issue is modification of parent series and association/update/delete of child event RECURRENCE-ID fields git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1169262 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkcal/resourcecached.cpp')
-rw-r--r--libkcal/resourcecached.cpp22
1 files changed, 17 insertions, 5 deletions
diff --git a/libkcal/resourcecached.cpp b/libkcal/resourcecached.cpp
index 3b654aef3..155d24a0d 100644
--- a/libkcal/resourcecached.cpp
+++ b/libkcal/resourcecached.cpp
@@ -487,12 +487,24 @@ void ResourceCached::calendarIncidenceDeleted( Incidence *i )
<< i->uid() << endl;
#endif
- TQMap<Incidence *,bool>::ConstIterator it;
- it = mDeletedIncidences.find( i );
- if ( it == mDeletedIncidences.end() ) {
- mDeletedIncidences.insert( i, true );
+ if (i->hasRecurrenceID()) {
+ // This incidence has a parent; notify the parent of the child's death and do not destroy the parent!
+ // Get the parent
+ IncidenceList il = i->childIncidences();
+ IncidenceListIterator it;
+ it = il.begin();
+ Incidence *parentIncidence;
+ parentIncidence = this->incidence(*it);
+ // Remove the child
+ calendarIncidenceChanged(parentIncidence);
+ }
+ else {
+ TQMap<Incidence *,bool>::ConstIterator it;
+ it = mDeletedIncidences.find( i );
+ if ( it == mDeletedIncidences.end() ) {
+ mDeletedIncidences.insert( i, true );
+ }
}
-
checkForAutomaticSave();
}