-rw-r--r-- | libkcal/calendar.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libkcal/calendar.cpp b/libkcal/calendar.cpp index ed39ddb..7e8e2c5 100644 --- a/libkcal/calendar.cpp +++ b/libkcal/calendar.cpp | |||
@@ -340,37 +340,37 @@ void Calendar::addIncidenceBranch(Incidence *i) | |||
340 | addIncidence( i ); | 340 | addIncidence( i ); |
341 | Incidence * inc; | 341 | Incidence * inc; |
342 | QPtrList<Incidence> Relations = i->relations(); | 342 | QPtrList<Incidence> Relations = i->relations(); |
343 | for (inc=Relations.first();inc;inc=Relations.next()) { | 343 | for (inc=Relations.first();inc;inc=Relations.next()) { |
344 | addIncidenceBranch( inc ); | 344 | addIncidenceBranch( inc ); |
345 | } | 345 | } |
346 | } | 346 | } |
347 | 347 | ||
348 | bool Calendar::addIncidence(Incidence *i) | 348 | bool Calendar::addIncidence(Incidence *i) |
349 | { | 349 | { |
350 | Incidence::AddVisitor<Calendar> v(this); | 350 | Incidence::AddVisitor<Calendar> v(this); |
351 | 351 | ||
352 | return i->accept(v); | 352 | return i->accept(v); |
353 | } | 353 | } |
354 | void Calendar::deleteIncidence(Incidence *in) | 354 | void Calendar::deleteIncidence(Incidence *in) |
355 | { | 355 | { |
356 | if ( in->type() == "Event" ) | 356 | if ( in->typeID() == eventID ) |
357 | deleteEvent( (Event*) in ); | 357 | deleteEvent( (Event*) in ); |
358 | else if ( in->type() =="Todo" ) | 358 | else if ( in->typeID() == todoID ) |
359 | deleteTodo( (Todo*) in); | 359 | deleteTodo( (Todo*) in); |
360 | else if ( in->type() =="Journal" ) | 360 | else if ( in->typeID() == journalID ) |
361 | deleteJournal( (Journal*) in ); | 361 | deleteJournal( (Journal*) in ); |
362 | } | 362 | } |
363 | 363 | ||
364 | Incidence* Calendar::incidence( const QString& uid ) | 364 | Incidence* Calendar::incidence( const QString& uid ) |
365 | { | 365 | { |
366 | Incidence* i; | 366 | Incidence* i; |
367 | 367 | ||
368 | if( (i = todo( uid )) != 0 ) | 368 | if( (i = todo( uid )) != 0 ) |
369 | return i; | 369 | return i; |
370 | if( (i = event( uid )) != 0 ) | 370 | if( (i = event( uid )) != 0 ) |
371 | return i; | 371 | return i; |
372 | if( (i = journal( uid )) != 0 ) | 372 | if( (i = journal( uid )) != 0 ) |
373 | return i; | 373 | return i; |
374 | 374 | ||
375 | return 0; | 375 | return 0; |
376 | } | 376 | } |