rem: bool sendToKOrganizer(const KAEvent&) { return false; }
add: bool sendToKOrganizer(const KAEvent& event) {  KCal::Event* kcalEvent = event.event(); QString uid = KAEvent::uid(event.id(), KAEvent::KORGANIZER); kcalEvent->setUid(uid); kcalEvent->clearAlarms(); QString userName; QString userEmail; switch (event.action()) { case KAEvent::MESSAGE: case KAEvent::FILE: case KAEvent::COMMAND: kcalEvent->setSummary(event.cleanText()); userEmail = Preferences::instance()->emailAddress(); break; case KAEvent::EMAIL: { QString from = event.emailFromKMail().isEmpty() ? Preferences::instance()->emailAddress() : KAMail::identityManager()->identityForName(event.emailFromKMail()).fullEmailAddr(); AlarmText atext; atext.setEmail(event.emailAddresses(", "), from, QString::null, QString::null, event.emailSubject(), QString::null); kcalEvent->setSummary(atext.displayText()); userEmail = from; break; } } kcalEvent->setOrganizer(KCal::Person(userName, userEmail));   KCal::ICalFormat format; format.setTimeZone(QString::null, false); QString iCal = format.toICalString(kcalEvent); kdDebug(5950)<<"Korg->"<<iCal<<endl; delete kcalEvent;   if (!runKOrganizer()) return false; QByteArray  data, replyData; QCString    replyType; QDataStream arg(data, IO_WriteOnly); arg << iCal; if (kapp->dcopClient()->call(korganizerName, KORG_DCOP_OBJECT, "addIncidence(QString)", data, replyType, replyData) &&  replyType == "bool") { bool result; QDataStream reply(replyData, IO_ReadOnly); reply >> result; if (result) { kdDebug(5950) << "sendToKOrganizer(" << uid << "): success\n"; return true; } } kdError(5950) << "sendToKOrganizer(): KOrganizer addEvent(" << uid << ") dcop call failed\n"; return false; }
context: bool sendToKOrganizer(const KAEvent&) { return false; }