-rw-r--r-- | libkcal/calendarlocal.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp index 8a5a76f..ce3cd09 100644 --- a/libkcal/calendarlocal.cpp +++ b/libkcal/calendarlocal.cpp @@ -285,2 +285,5 @@ void CalendarLocal::addCalendar( Calendar* cal ) ev->resetRelatedTo(); + Todo * se = todo( ev->uid() ); + if ( se ) + deleteTodo( se ); ev = TodoList.next(); @@ -290,5 +293,2 @@ void CalendarLocal::addCalendar( Calendar* cal ) while ( ev ) { - Todo * se = todo( ev->uid() ); - if ( se ) - incList.append( se ); ev->unRegisterObserver( cal ); @@ -314,4 +314,4 @@ 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 ); } |