author | zautrix <zautrix> | 2005-11-28 03:27:16 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-11-28 03:27:16 (UTC) |
commit | b7522a13b64225bb91bdab4a21b44282f8c3e3b4 (patch) (side-by-side diff) | |
tree | 3aa005036dd83f3d0e5f57dd398dc260666daea1 /libkcal | |
parent | 084180efc1bccba341bf3f2f718fd10cdfdaf18e (diff) | |
download | kdepimpi-b7522a13b64225bb91bdab4a21b44282f8c3e3b4.zip kdepimpi-b7522a13b64225bb91bdab4a21b44282f8c3e3b4.tar.gz kdepimpi-b7522a13b64225bb91bdab4a21b44282f8c3e3b4.tar.bz2 |
sync
-rw-r--r-- | libkcal/calendarlocal.cpp | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp index 980663f..8a5a76f 100644 --- a/libkcal/calendarlocal.cpp +++ b/libkcal/calendarlocal.cpp @@ -261,5 +261,5 @@ void CalendarLocal::addCalendar( Calendar* cal ) setSyncEventsEnabled(); + QPtrList<Incidence> incList; { QPtrList<Event> EventList = cal->rawEvents(); - QPtrList<Event> el; Event * ev = EventList.first(); @@ -267,7 +267,7 @@ void CalendarLocal::addCalendar( Calendar* cal ) if ( ev->uid().left( 15 ) == QString("last-syncEvent-") ) { - Event * se = event( ev->uid() ); - if ( se ) - el.append( se ); ev->setCalID_block( 1 ); } + Event * se = event( ev->uid() ); + if ( se ) + incList.append( se ); ev->unRegisterObserver( cal ); @@ -277,5 +277,3 @@ void CalendarLocal::addCalendar( Calendar* cal ) } - for ( ev = el.first(); ev; ev = el.next() ) { - deleteIncidence ( ev ); - } + } @@ -292,2 +290,5 @@ void CalendarLocal::addCalendar( Calendar* cal ) while ( ev ) { + Todo * se = todo( ev->uid() ); + if ( se ) + incList.append( se ); ev->unRegisterObserver( cal ); @@ -303,2 +304,5 @@ void CalendarLocal::addCalendar( Calendar* cal ) while ( ev ) { + Journal * se = journal( ev->uid() ); + if ( se ) + incList.append( se ); ev->unRegisterObserver( cal ); @@ -309,2 +313,7 @@ void CalendarLocal::addCalendar( Calendar* cal ) } + { + for (Incidence * ev = incList.first(); ev; ev = incList.next() ) { + deleteIncidence ( ev ); + } + } setModified( true ); |