summaryrefslogtreecommitdiffabout
path: root/libkcal/icalformat.cpp
Unidiff
Diffstat (limited to 'libkcal/icalformat.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libkcal/icalformat.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/libkcal/icalformat.cpp b/libkcal/icalformat.cpp
index 5893db5..f2e7dfc 100644
--- a/libkcal/icalformat.cpp
+++ b/libkcal/icalformat.cpp
@@ -396,74 +396,76 @@ ScheduleMessage *ICalFormat::parseScheduleMessage( Calendar *cal,
396 setException(new ErrorFormat(ErrorFormat::Restriction, 396 setException(new ErrorFormat(ErrorFormat::Restriction,
397 Scheduler::translatedMethodName(method) + ": " + 397 Scheduler::translatedMethodName(method) + ": " +
398 mImpl->extractErrorProperty(c))); 398 mImpl->extractErrorProperty(c)));
399 return 0; 399 return 0;
400 } 400 }
401 401
402 icalcomponent *calendarComponent = mImpl->createCalendarComponent(cal); 402 icalcomponent *calendarComponent = mImpl->createCalendarComponent(cal);
403 403
404 Incidence *existingIncidence = cal->event(incidence->uid()); 404 Incidence *existingIncidence = cal->event(incidence->uid());
405 if (existingIncidence) { 405 if (existingIncidence) {
406 // TODO: check, if cast is required, or if it can be done by virtual funcs. 406 // TODO: check, if cast is required, or if it can be done by virtual funcs.
407 if (existingIncidence->type() == "Todo") { 407 if (existingIncidence->type() == "Todo") {
408 Todo *todo = static_cast<Todo *>(existingIncidence); 408 Todo *todo = static_cast<Todo *>(existingIncidence);
409 icalcomponent_add_component(calendarComponent, 409 icalcomponent_add_component(calendarComponent,
410 mImpl->writeTodo(todo)); 410 mImpl->writeTodo(todo));
411 } 411 }
412 if (existingIncidence->type() == "Event") { 412 if (existingIncidence->type() == "Event") {
413 Event *event = static_cast<Event *>(existingIncidence); 413 Event *event = static_cast<Event *>(existingIncidence);
414 icalcomponent_add_component(calendarComponent, 414 icalcomponent_add_component(calendarComponent,
415 mImpl->writeEvent(event)); 415 mImpl->writeEvent(event));
416 } 416 }
417 } else { 417 } else {
418 calendarComponent = 0; 418 calendarComponent = 0;
419 } 419 }
420 420 qDebug("icalclassify commented out ");
421 ScheduleMessage::Status status;
422#if 0
421 423
422 icalclass result = icalclassify(message,calendarComponent,(char *)""); 424 icalclass result = icalclassify(message,calendarComponent,(char *)"");
423 425
424 426
425 ScheduleMessage::Status status;
426 427
427 switch (result) { 428 switch (result) {
428 case ICAL_PUBLISH_NEW_CLASS: 429 case ICAL_PUBLISH_NEW_CLASS:
429 status = ScheduleMessage::PublishNew; 430 status = ScheduleMessage::PublishNew;
430 break; 431 break;
431 case ICAL_OBSOLETE_CLASS: 432 case ICAL_OBSOLETE_CLASS:
432 status = ScheduleMessage::Obsolete; 433 status = ScheduleMessage::Obsolete;
433 break; 434 break;
434 case ICAL_REQUEST_NEW_CLASS: 435 case ICAL_REQUEST_NEW_CLASS:
435 status = ScheduleMessage::RequestNew; 436 status = ScheduleMessage::RequestNew;
436 break; 437 break;
437 case ICAL_REQUEST_UPDATE_CLASS: 438 case ICAL_REQUEST_UPDATE_CLASS:
438 status = ScheduleMessage::RequestUpdate; 439 status = ScheduleMessage::RequestUpdate;
439 break; 440 break;
440 case ICAL_UNKNOWN_CLASS: 441 case ICAL_UNKNOWN_CLASS:
441 default: 442 default:
442 status = ScheduleMessage::Unknown; 443 status = ScheduleMessage::Unknown;
443 break; 444 break;
444 } 445 }
445 446#endif
447 status = ScheduleMessage::RequestUpdate;
446 return new ScheduleMessage(incidence,method,status); 448 return new ScheduleMessage(incidence,method,status);
447} 449}
448 450
449void ICalFormat::setTimeZone( const QString &id, bool utc ) 451void ICalFormat::setTimeZone( const QString &id, bool utc )
450{ 452{
451 453
452 454
453 mTimeZoneId = id; 455 mTimeZoneId = id;
454 mUtc = utc; 456 mUtc = utc;
455 457
456 tzOffsetMin = KGlobal::locale()->timezoneOffset(mTimeZoneId); 458 tzOffsetMin = KGlobal::locale()->timezoneOffset(mTimeZoneId);
457 459
458 //qDebug("ICalFormat::setTimeZoneOffset %s %d ",mTimeZoneId.latin1(), tzOffsetMin); 460 //qDebug("ICalFormat::setTimeZoneOffset %s %d ",mTimeZoneId.latin1(), tzOffsetMin);
459} 461}
460 462
461QString ICalFormat::timeZoneId() const 463QString ICalFormat::timeZoneId() const
462{ 464{
463 return mTimeZoneId; 465 return mTimeZoneId;
464} 466}
465 467
466bool ICalFormat::utc() const 468bool ICalFormat::utc() const
467{ 469{
468 return mUtc; 470 return mUtc;
469} 471}