Differential D22248 Diff 61358 plugins/messageviewer/bodypartformatter/semantic/semanticurlhandler.cpp
Changeset View
Changeset View
Standalone View
Standalone View
plugins/messageviewer/bodypartformatter/semantic/semanticurlhandler.cpp
Show First 20 Lines • Show All 323 Lines • ▼ Show 20 Line(s) | 319 | for (const auto &reservation : reservations) { | |||
---|---|---|---|---|---|
324 | const auto res = JsonLd::convert<Reservation>(reservation); | 324 | const auto res = JsonLd::convert<Reservation>(reservation); | ||
325 | const auto data = memento->rawPassData(res.pkpassPassTypeIdentifier(), res.pkpassSerialNumber()); | 325 | const auto data = memento->rawPassData(res.pkpassPassTypeIdentifier(), res.pkpassSerialNumber()); | ||
326 | if (data.isEmpty()) { | 326 | if (data.isEmpty()) { | ||
327 | return; | 327 | return; | ||
328 | } | 328 | } | ||
329 | 329 | | |||
330 | event->deleteAttachments(QStringLiteral("application/vnd.apple.pkpass")); | 330 | event->deleteAttachments(QStringLiteral("application/vnd.apple.pkpass")); | ||
331 | using namespace KCalCore; | 331 | using namespace KCalCore; | ||
332 | Attachment::Ptr att(new Attachment(data.toBase64(), QStringLiteral("application/vnd.apple.pkpass"))); | 332 | Attachment att(data.toBase64(), QStringLiteral("application/vnd.apple.pkpass")); | ||
333 | att->setLabel(i18n("Boarding Pass")); // TODO add passenger name after string freeze is lifted | 333 | att.setLabel(i18n("Boarding Pass")); // TODO add passenger name after string freeze is lifted | ||
334 | event->addAttachment(att); | 334 | event->addAttachment(att); | ||
335 | } | 335 | } | ||
336 | } | 336 | } | ||
337 | 337 | | |||
338 | void SemanticUrlHandler::addToCalendar(SemanticMemento *memento) const | 338 | void SemanticUrlHandler::addToCalendar(SemanticMemento *memento) const | ||
339 | { | 339 | { | ||
340 | using namespace KCalCore; | 340 | using namespace KCalCore; | ||
341 | 341 | | |||
▲ Show 20 Lines • Show All 130 Lines • Show Last 20 Lines |