diff options
Diffstat (limited to 'examples/maildirresource/maildirresource.cpp')
-rw-r--r-- | examples/maildirresource/maildirresource.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/examples/maildirresource/maildirresource.cpp b/examples/maildirresource/maildirresource.cpp index 33883a7..922eb5a 100644 --- a/examples/maildirresource/maildirresource.cpp +++ b/examples/maildirresource/maildirresource.cpp | |||
@@ -311,6 +311,18 @@ KAsync::Job<void> MaildirResource::inspect(int inspectionType, const QByteArray | |||
311 | } | 311 | } |
312 | return KAsync::null<void>(); | 312 | return KAsync::null<void>(); |
313 | } | 313 | } |
314 | if (property == "subject") { | ||
315 | const auto remoteId = resolveLocalId(ENTITY_TYPE_MAIL, entityId, synchronizationTransaction); | ||
316 | |||
317 | KMime::Message *msg = new KMime::Message; | ||
318 | msg->setHead(KMime::CRLFtoLF(KPIM::Maildir::readEntryHeadersFromFile(remoteId))); | ||
319 | msg->parse(); | ||
320 | |||
321 | if (msg->subject(true)->asUnicodeString() != expectedValue.toString()) { | ||
322 | return KAsync::error<void>(1, "Subject not as expected."); | ||
323 | } | ||
324 | return KAsync::null<void>(); | ||
325 | } | ||
314 | } | 326 | } |
315 | if (inspectionType == Sink::Resources::Inspection::ExistenceInspectionType) { | 327 | if (inspectionType == Sink::Resources::Inspection::ExistenceInspectionType) { |
316 | const auto remoteId = resolveLocalId(ENTITY_TYPE_MAIL, entityId, synchronizationTransaction); | 328 | const auto remoteId = resolveLocalId(ENTITY_TYPE_MAIL, entityId, synchronizationTransaction); |