Diffstat (limited to 'korganizer/outgoingdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/outgoingdialog.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/korganizer/outgoingdialog.cpp b/korganizer/outgoingdialog.cpp index 4eb64f3..0fc90c4 100644 --- a/korganizer/outgoingdialog.cpp +++ b/korganizer/outgoingdialog.cpp @@ -330,65 +330,64 @@ void OutgoingDialog::loadMessages() if (iter.data() == outgoingDirName + "/" + (*it)) inserted = true; } if (!inserted) { if (!f.open(IO_ReadOnly)) { kdDebug() << "OutgoingDialog::loadMessage(): Can't open file'" << (*it) << "'" << endl; } else { QTextStream t(&f); QString messageString = t.read(); ScheduleMessage *message = mFormat->parseScheduleMessage(mCalendar, messageString); int begin_pos = messageString.find("METHOD-BEGIN:"); begin_pos = messageString.find('\n',begin_pos)+1; QString meth = messageString.mid(begin_pos,1); switch (meth.toInt()) { case 0:method=Scheduler::Publish; break; case 1:method=Scheduler::Request; break; case 2:method=Scheduler::Refresh; break; case 3:method=Scheduler::Cancel; break; case 4:method=Scheduler::Add; break; case 5:method=Scheduler::Reply; break; case 6:method=Scheduler::Counter; break; case 7:method=Scheduler::Declinecounter; break; default :method=Scheduler::NoMethod; break; } begin_pos = messageString.find("RECIPIENTS-BEGIN:"); begin_pos = messageString.find('\n',begin_pos)+1; int end_pos = messageString.find(":RECIPIENTS-END",begin_pos)-1; recipients = messageString.mid(begin_pos, end_pos-begin_pos); kdDebug() << "Outgoing::loadMessage(): Recipients: " << recipients << endl; if (message) { bool inserted = false; QMap<IncidenceBase*, QString>::Iterator iter; for ( iter = mMessageMap.begin(); iter != mMessageMap.end(); ++iter ) { if (iter.data() == outgoingDirName + "/" + (*it)) inserted = true; } if (!inserted) { kdDebug() << "OutgoingDialog::loadMessage(): got message '" << (*it) << "'" << endl; IncidenceBase *inc = message->event(); new ScheduleItemOut(mMessageListView,inc,method,recipients); mMessageMap[message->event()]=outgoingDirName + "/" + (*it); } } else { QString errorMessage; if (mFormat->exception()) { errorMessage = mFormat->exception()->message(); } kdDebug() << "OutgoingDialog::loadMessage(): Error parsing " "message: " << errorMessage << endl; } f.close(); } } } emit numMessagesChanged(mMessageListView->childCount()); } void OutgoingDialog::setDocumentId( const QString &id ) { mDocPrefs->setDoc( id ); } -#include "outgoingdialog.moc" |