Changeset View
Changeset View
Standalone View
Standalone View
conversion/kcalconversion.cpp
Show First 20 Lines • Show All 310 Lines • ▼ Show 20 Lines | foreach (const Kolab::Attendee a, e.attendees()) { | ||||
} | } | ||||
i.addAttendee(attendee); | i.addAttendee(attendee); | ||||
} | } | ||||
foreach (const Kolab::Attachment a, e.attachments()) { | foreach (const Kolab::Attachment a, e.attachments()) { | ||||
KCalCore::Attachment::Ptr ptr; | KCalCore::Attachment::Ptr ptr; | ||||
if (!a.uri().empty()) { | if (!a.uri().empty()) { | ||||
ptr = KCalCore::Attachment::Ptr(new KCalCore::Attachment(fromStdString(a.uri()), fromStdString(a.mimetype()))); | ptr = KCalCore::Attachment::Ptr(new KCalCore::Attachment(fromStdString(a.uri()), fromStdString(a.mimetype()))); | ||||
} else { | } else { | ||||
ptr = KCalCore::Attachment::Ptr(new KCalCore::Attachment(QByteArray::fromRawData(a.data().c_str(), a.data().size()), fromStdString(a.mimetype()))); | ptr = KCalCore::Attachment::Ptr(new KCalCore::Attachment(QByteArray(a.data().c_str(), a.data().size()), fromStdString(a.mimetype()))); | ||||
} | } | ||||
if (!a.label().empty()) { | if (!a.label().empty()) { | ||||
ptr->setLabel(fromStdString(a.label())); | ptr->setLabel(fromStdString(a.label())); | ||||
} | } | ||||
i.addAttachment(ptr); | i.addAttachment(ptr); | ||||
} | } | ||||
QMap<QByteArray, QString> props; | QMap<QByteArray, QString> props; | ||||
▲ Show 20 Lines • Show All 532 Lines • Show Last 20 Lines |