Diffstat (limited to 'korganizer/incomingdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/incomingdialog.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/korganizer/incomingdialog.cpp b/korganizer/incomingdialog.cpp index 50e3077..fe78356 100644 --- a/korganizer/incomingdialog.cpp +++ b/korganizer/incomingdialog.cpp @@ -177,9 +177,9 @@ void IncomingDialog::retrieve() Scheduler::Method method = (Scheduler::Method)message->method(); ScheduleMessage::Status status = message->status(); ScheduleItemIn *item = new ScheduleItemIn(mMessageListView,inc,method,status); - if(inc->type()!="FreeBusy") { + if(inc->typeID() != freebusyID ) { Incidence *incidence = static_cast<Incidence *>(inc); ScheduleItemVisitor v(item); if (!incidence->accept(v)) delete item; } else { @@ -254,9 +254,9 @@ void IncomingDialog::rejectMessage() void IncomingDialog::showEvent(QListViewItem *item) { IncidenceBase *incidence = ((ScheduleItemIn *)item)->event(); - if( incidence && incidence->type() == "Event" ) { + if( incidence && incidence->typeID() == eventID ) { Event *event = static_cast<Event *>(incidence); KOEventViewerDialog *eventViewer = new KOEventViewerDialog(this); eventViewer->setEvent(event); eventViewer->show(); @@ -289,9 +289,9 @@ bool IncomingDialog::incomeRefresh(ScheduleItemIn *item) bool IncomingDialog::incomeCounter(ScheduleItemIn *item) { IncidenceBase *incidence = ((ScheduleItemIn *)item)->event(); // currently only events supportet - attetion at insertion below! - if ( incidence->type() != "Event" ) return false; + if ( incidence->typeID() != eventID ) return false; Event *counterEvent = static_cast<Event *>( incidence ); Event *even = mCalendar->event(counterEvent->uid()); @@ -367,9 +367,9 @@ bool IncomingDialog::incomeDeclineCounter(ScheduleItemIn *item) bool IncomingDialog::incomeAdd(ScheduleItemIn *item) { IncidenceBase *incidence = ((ScheduleItemIn *)item)->event(); - if (incidence->type() == "Event" ) { + if (incidence->typeID() == eventID ) { Event *refr = static_cast<Event *>( incidence ); mOutgoing->addMessage(refr,Scheduler::Refresh); mScheduler->deleteTransaction( incidence ); delete item; @@ -401,9 +401,9 @@ bool IncomingDialog::incomeDefault(ScheduleItemIn *item) } bool IncomingDialog::incomeRequest(ScheduleItemIn *item) { - if (item->event()->type()=="FreeBusy") { + if (item->event()->typeID() == freebusyID ) { //handel freebusy request IncidenceBase *inc = item->event(); QDateTime start = inc->dtStart(); QDateTime end = start.addDays(inc->duration()/86400); @@ -436,9 +436,9 @@ bool IncomingDialog::automaticAction(ScheduleItemIn *item) bool autoAction = false; IncidenceBase *inc = item->event(); Scheduler::Method method = item->method(); - if( inc->type()=="FreeBusy" ) { + if( inc->typeID() == freebusyID ) { if ( method==Scheduler::Request ) { if ( KOPrefs::instance()->mIMIPAutoFreeBusy==KOPrefs::addressbookAuto ) { // reply freebusy information if ( checkOrganizerInAddressbook(inc->organizer()) ) { @@ -464,9 +464,9 @@ bool IncomingDialog::automaticAction(ScheduleItemIn *item) } } } - if ( inc->type()=="Event" ) { + if ( inc->typeID() == eventID ) { if ( method==Scheduler::Request || method==Scheduler::Publish ) { if ( KOPrefs::instance()->mIMIPAutoInsertRequest==KOPrefs::addressbookAuto ) { // insert event if ( checkOrganizerInAddressbook(inc->organizer()) ) |