-rw-r--r-- | libkcal/icalformat.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libkcal/icalformat.cpp b/libkcal/icalformat.cpp index 3a2aac6..d9fe40b 100644 --- a/libkcal/icalformat.cpp +++ b/libkcal/icalformat.cpp | |||
@@ -363,54 +363,54 @@ ScheduleMessage *ICalFormat::parseScheduleMessage( Calendar *cal, | |||
363 | method = Scheduler::Counter; | 363 | method = Scheduler::Counter; |
364 | break; | 364 | break; |
365 | case ICAL_METHOD_DECLINECOUNTER: | 365 | case ICAL_METHOD_DECLINECOUNTER: |
366 | method = Scheduler::Declinecounter; | 366 | method = Scheduler::Declinecounter; |
367 | break; | 367 | break; |
368 | default: | 368 | default: |
369 | method = Scheduler::NoMethod; | 369 | method = Scheduler::NoMethod; |
370 | kdDebug(5800) << "ICalFormat::parseScheduleMessage(): Unknow method" << endl; | 370 | kdDebug(5800) << "ICalFormat::parseScheduleMessage(): Unknow method" << endl; |
371 | break; | 371 | break; |
372 | } | 372 | } |
373 | 373 | ||
374 | 374 | ||
375 | if (!icalrestriction_check(message)) { | 375 | if (!icalrestriction_check(message)) { |
376 | setException(new ErrorFormat(ErrorFormat::Restriction, | 376 | setException(new ErrorFormat(ErrorFormat::Restriction, |
377 | Scheduler::translatedMethodName(method) + ": " + | 377 | Scheduler::translatedMethodName(method) + ": " + |
378 | mImpl->extractErrorProperty(c))); | 378 | mImpl->extractErrorProperty(c))); |
379 | return 0; | 379 | return 0; |
380 | } | 380 | } |
381 | 381 | ||
382 | icalcomponent *calendarComponent = mImpl->createCalendarComponent(cal); | 382 | icalcomponent *calendarComponent = mImpl->createCalendarComponent(cal); |
383 | 383 | ||
384 | Incidence *existingIncidence = cal->event(incidence->uid()); | 384 | Incidence *existingIncidence = cal->event(incidence->uid()); |
385 | if (existingIncidence) { | 385 | if (existingIncidence) { |
386 | // TODO: check, if cast is required, or if it can be done by virtual funcs. | 386 | // TODO: check, if cast is required, or if it can be done by virtual funcs. |
387 | if (existingIncidence->type() == "Todo") { | 387 | if (existingIncidence->typeID() == todoID ) { |
388 | Todo *todo = static_cast<Todo *>(existingIncidence); | 388 | Todo *todo = static_cast<Todo *>(existingIncidence); |
389 | icalcomponent_add_component(calendarComponent, | 389 | icalcomponent_add_component(calendarComponent, |
390 | mImpl->writeTodo(todo)); | 390 | mImpl->writeTodo(todo)); |
391 | } | 391 | } |
392 | if (existingIncidence->type() == "Event") { | 392 | if (existingIncidence->typeID() == eventID ) { |
393 | Event *event = static_cast<Event *>(existingIncidence); | 393 | Event *event = static_cast<Event *>(existingIncidence); |
394 | icalcomponent_add_component(calendarComponent, | 394 | icalcomponent_add_component(calendarComponent, |
395 | mImpl->writeEvent(event)); | 395 | mImpl->writeEvent(event)); |
396 | } | 396 | } |
397 | } else { | 397 | } else { |
398 | calendarComponent = 0; | 398 | calendarComponent = 0; |
399 | } | 399 | } |
400 | qDebug("icalclassify commented out "); | 400 | qDebug("icalclassify commented out "); |
401 | ScheduleMessage::Status status; | 401 | ScheduleMessage::Status status; |
402 | #if 0 | 402 | #if 0 |
403 | 403 | ||
404 | icalclass result = icalclassify(message,calendarComponent,(char *)""); | 404 | icalclass result = icalclassify(message,calendarComponent,(char *)""); |
405 | 405 | ||
406 | 406 | ||
407 | 407 | ||
408 | switch (result) { | 408 | switch (result) { |
409 | case ICAL_PUBLISH_NEW_CLASS: | 409 | case ICAL_PUBLISH_NEW_CLASS: |
410 | status = ScheduleMessage::PublishNew; | 410 | status = ScheduleMessage::PublishNew; |
411 | break; | 411 | break; |
412 | case ICAL_OBSOLETE_CLASS: | 412 | case ICAL_OBSOLETE_CLASS: |
413 | status = ScheduleMessage::Obsolete; | 413 | status = ScheduleMessage::Obsolete; |
414 | break; | 414 | break; |
415 | case ICAL_REQUEST_NEW_CLASS: | 415 | case ICAL_REQUEST_NEW_CLASS: |
416 | status = ScheduleMessage::RequestNew; | 416 | status = ScheduleMessage::RequestNew; |