-rw-r--r-- | libkcal/calendarlocal.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp index 2a57724..c33581c 100644 --- a/libkcal/calendarlocal.cpp +++ b/libkcal/calendarlocal.cpp | |||
@@ -198,25 +198,26 @@ void CalendarLocal::setSyncEventsReadOnly() | |||
198 | void CalendarLocal::addCalendar( Calendar* cal ) | 198 | void CalendarLocal::addCalendar( Calendar* cal ) |
199 | { | 199 | { |
200 | cal->setDontDeleteIncidencesOnClose(); | 200 | cal->setDontDeleteIncidencesOnClose(); |
201 | setSyncEventsEnabled(); | 201 | setSyncEventsEnabled(); |
202 | { | 202 | { |
203 | QPtrList<Event> EventList = cal->rawEvents(); | 203 | QPtrList<Event> EventList = cal->rawEvents(); |
204 | QPtrList<Event> el; | 204 | QPtrList<Event> el; |
205 | Event * ev = EventList.first(); | 205 | Event * ev = EventList.first(); |
206 | while ( ev ) { | 206 | while ( ev ) { |
207 | if ( ev->uid().left( 15 ) == QString("last-syncEvent-") ) { | 207 | if ( ev->uid().left( 15 ) == QString("last-syncEvent-") ) { |
208 | Event * se = event( ev->uid() ); | 208 | Event * se = event( ev->uid() ); |
209 | if ( se ) | 209 | if ( se ) |
210 | el.append( se ); | 210 | el.append( se ); |
211 | ev->setCalID( 1 ); | ||
211 | } | 212 | } |
212 | ev->unRegisterObserver( cal ); | 213 | ev->unRegisterObserver( cal ); |
213 | ev->registerObserver( this ); | 214 | ev->registerObserver( this ); |
214 | mEventList.append( ev ); | 215 | mEventList.append( ev ); |
215 | ev = EventList.next(); | 216 | ev = EventList.next(); |
216 | } | 217 | } |
217 | for ( ev = el.first(); ev; ev = el.next() ) { | 218 | for ( ev = el.first(); ev; ev = el.next() ) { |
218 | deleteIncidence ( ev ); | 219 | deleteIncidence ( ev ); |
219 | } | 220 | } |
220 | } | 221 | } |
221 | { | 222 | { |
222 | 223 | ||