summaryrefslogtreecommitdiffstats
path: root/examples/maildirresource/maildirresource.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-05-31 15:11:54 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-05-31 15:11:54 +0200
commit2061ba0cf16b6a0a3313f861f79b90cf2905efce (patch)
treec0e28aa0ff2271140bb58d6a0f1b51c9fc28a103 /examples/maildirresource/maildirresource.cpp
parent4798de83c9f198bfc0a802a987c9002968fb6c2c (diff)
downloadsink-2061ba0cf16b6a0a3313f861f79b90cf2905efce.tar.gz
sink-2061ba0cf16b6a0a3313f861f79b90cf2905efce.zip
The maildir resource passes the maildirmailsync test
Diffstat (limited to 'examples/maildirresource/maildirresource.cpp')
-rw-r--r--examples/maildirresource/maildirresource.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/examples/maildirresource/maildirresource.cpp b/examples/maildirresource/maildirresource.cpp
index ca20fa3..268f506 100644
--- a/examples/maildirresource/maildirresource.cpp
+++ b/examples/maildirresource/maildirresource.cpp
@@ -373,7 +373,11 @@ public:
373 KAsync::Job<void> synchronizeWithSource() Q_DECL_OVERRIDE 373 KAsync::Job<void> synchronizeWithSource() Q_DECL_OVERRIDE
374 { 374 {
375 Log() << " Synchronizing"; 375 Log() << " Synchronizing";
376 return KAsync::start<void>([this]() { 376 return KAsync::start<void, KAsync::Job<void> >([this]() {
377 KPIM::Maildir maildir(mMaildirPath, true);
378 if (!maildir.isValid(false)) {
379 return KAsync::error<void>(1, "Maildir path doesn't point to a valid maildir: " + mMaildirPath);
380 }
377 synchronizeFolders(); 381 synchronizeFolders();
378 //The next sync needs the folders available 382 //The next sync needs the folders available
379 commit(); 383 commit();
@@ -385,6 +389,7 @@ public:
385 commitSync(); 389 commitSync();
386 } 390 }
387 Log() << "Done Synchronizing"; 391 Log() << "Done Synchronizing";
392 return KAsync::null<void>();
388 }); 393 });
389 } 394 }
390 395
@@ -410,7 +415,6 @@ public:
410 }); 415 });
411 } else if (operation == Sink::Operation_Removal) { 416 } else if (operation == Sink::Operation_Removal) {
412 Trace() << "Removing a mail: " << oldRemoteId; 417 Trace() << "Removing a mail: " << oldRemoteId;
413 // QFile::remove(oldRemoteId);
414 return KAsync::null<QByteArray>(); 418 return KAsync::null<QByteArray>();
415 } else if (operation == Sink::Operation_Modification) { 419 } else if (operation == Sink::Operation_Modification) {
416 Trace() << "Modifying a mail: " << oldRemoteId; 420 Trace() << "Modifying a mail: " << oldRemoteId;