From 1267a02fc23575f82247f8bd8449dc70dab62d44 Mon Sep 17 00:00:00 2001 From: zautrix Date: Mon, 28 Nov 2005 05:15:27 +0000 Subject: sync --- (limited to 'libkcal') diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp index 8a5a76f..ce3cd09 100644 --- a/libkcal/calendarlocal.cpp +++ b/libkcal/calendarlocal.cpp @@ -283,14 +283,14 @@ void CalendarLocal::addCalendar( Calendar* cal ) Todo * ev = TodoList.first(); while ( ev ) { ev->resetRelatedTo(); - ev = TodoList.next(); + Todo * se = todo( ev->uid() ); + if ( se ) + deleteTodo( se ); + ev = TodoList.next(); } - //TodoList = cal->rawTodos(); + //TodoList = cal->rawTodos(); ev = TodoList.first(); while ( ev ) { - Todo * se = todo( ev->uid() ); - if ( se ) - incList.append( se ); ev->unRegisterObserver( cal ); ev->registerObserver( this ); mTodoList.append( ev ); @@ -312,8 +312,8 @@ void CalendarLocal::addCalendar( Calendar* cal ) } } { - for (Incidence * ev = incList.first(); ev; ev = incList.next() ) { - deleteIncidence ( ev ); + for (Incidence * inc = incList.first(); inc; inc = incList.next() ) { + deleteIncidence ( inc ); } } setModified( true ); -- cgit v0.9.0.2