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 @@ -173,17 +173,17 @@ void IncomingDialog::retrieve() ScheduleMessage *message; for(message = messages.first();message;message = messages.next()) { IncidenceBase *inc = message->event(); 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 { FreeBusy *fb = static_cast<FreeBusy *>(item->event()); item->setText(0, "FreeBusy"); item->setText(1, KGlobal::locale()->formatDate( fb->dtStart().date() ) ); item->setText(2, KGlobal::locale()->formatTime( fb->dtStart().time() ) ); @@ -250,17 +250,17 @@ void IncomingDialog::rejectMessage() delete item; emit numMessagesChanged(mMessageListView->childCount()); } } 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(); } } bool IncomingDialog::incomeRefresh(ScheduleItemIn *item) @@ -285,17 +285,17 @@ bool IncomingDialog::incomeRefresh(ScheduleItemIn *item) emit numMessagesChanged(mMessageListView->childCount()); return false; } 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()); KOCounterDialog *eventViewer = new KOCounterDialog(this); eventViewer->addText(i18n("counter proposal event","<b>Counter-event:</b><p>")); eventViewer->addEvent(counterEvent); @@ -363,17 +363,17 @@ bool IncomingDialog::incomeDeclineCounter(ScheduleItemIn *item) delete item; emit numMessagesChanged(mMessageListView->childCount()); return false; } 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; emit numMessagesChanged(mMessageListView->childCount()); return true; } else { @@ -397,17 +397,17 @@ bool IncomingDialog::incomeDefault(ScheduleItemIn *item) kdDebug() << "IncomingDialog::acceptMessage(): Error!" << endl; return false; } return false; } 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); FreeBusy *freebusy = new FreeBusy(mCalendar, start, end); freebusy->setOrganizer(inc->organizer()); Attendee *att = new Attendee(KOPrefs::instance()->fullName(), @@ -432,17 +432,17 @@ bool IncomingDialog::incomeRequest(ScheduleItemIn *item) } 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()) ) { incomeRequest(item); } } else return false; } else { @@ -460,17 +460,17 @@ bool IncomingDialog::automaticAction(ScheduleItemIn *item) //if ( checkOrganizerInAddressbook(inc->organizer()) ) } } else return false; } } } - 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()) ) autoAction = acceptMessage(item); } else return false; } else { |