summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-11-28 05:15:27 (UTC)
committer zautrix <zautrix>2005-11-28 05:15:27 (UTC)
commit1267a02fc23575f82247f8bd8449dc70dab62d44 (patch) (side-by-side diff)
treefda71877c6b590a3a5035e310c03950e1081b06f
parentb7522a13b64225bb91bdab4a21b44282f8c3e3b4 (diff)
downloadkdepimpi-1267a02fc23575f82247f8bd8449dc70dab62d44.zip
kdepimpi-1267a02fc23575f82247f8bd8449dc70dab62d44.tar.gz
kdepimpi-1267a02fc23575f82247f8bd8449dc70dab62d44.tar.bz2
sync
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/calendarlocal.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp
index 8a5a76f..ce3cd09 100644
--- a/libkcal/calendarlocal.cpp
+++ b/libkcal/calendarlocal.cpp
@@ -270,63 +270,63 @@ void CalendarLocal::addCalendar( Calendar* cal )
Event * se = event( ev->uid() );
if ( se )
incList.append( se );
ev->unRegisterObserver( cal );
ev->registerObserver( this );
mEventList.append( ev );
ev = EventList.next();
}
}
{
QPtrList<Todo> TodoList = cal->rawTodos();
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 );
setupRelations( ev );
ev = TodoList.next();
}
}
{
QPtrList<Journal> JournalList = cal->journals();
Journal * ev = JournalList.first();
while ( ev ) {
Journal * se = journal( ev->uid() );
if ( se )
incList.append( se );
ev->unRegisterObserver( cal );
ev->registerObserver( this );
mJournalList.append( ev );
ev = JournalList.next();
}
}
{
- for (Incidence * ev = incList.first(); ev; ev = incList.next() ) {
- deleteIncidence ( ev );
+ for (Incidence * inc = incList.first(); inc; inc = incList.next() ) {
+ deleteIncidence ( inc );
}
}
setModified( true );
}
bool CalendarLocal::load( const QString &fileName )
{
FileStorage storage( this, fileName );
return storage.load();
}
bool CalendarLocal::save( const QString &fileName, CalFormat *format )
{
FileStorage storage( this, fileName, format );
return storage.save();
}