diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-06-02 13:35:40 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-06-02 13:35:40 +0200 |
commit | 855a878bcc124f8949586b3656dcc6e545e18dc0 (patch) | |
tree | 6497f1710ba3db8953d204032e5e8c14a239ad33 /examples/imapresource/imapresource.cpp | |
parent | 64a1b21a7b11d640f0ebd37184aeb14a4d9e12db (diff) | |
download | sink-855a878bcc124f8949586b3656dcc6e545e18dc0.tar.gz sink-855a878bcc124f8949586b3656dcc6e545e18dc0.zip |
Always return jobs, not futures.
Otherwise the calls are not composable.
Diffstat (limited to 'examples/imapresource/imapresource.cpp')
-rw-r--r-- | examples/imapresource/imapresource.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/imapresource/imapresource.cpp b/examples/imapresource/imapresource.cpp index 5e5aae6..2bb28e7 100644 --- a/examples/imapresource/imapresource.cpp +++ b/examples/imapresource/imapresource.cpp | |||
@@ -54,6 +54,7 @@ | |||
54 | #define DEBUG_AREA "resource.imap" | 54 | #define DEBUG_AREA "resource.imap" |
55 | 55 | ||
56 | using namespace Imap; | 56 | using namespace Imap; |
57 | using namespace Sink; | ||
57 | 58 | ||
58 | class MailPropertyExtractor : public Sink::Preprocessor | 59 | class MailPropertyExtractor : public Sink::Preprocessor |
59 | { | 60 | { |
@@ -273,7 +274,7 @@ public: | |||
273 | commitSync(); | 274 | commitSync(); |
274 | folderList << folders; | 275 | folderList << folders; |
275 | 276 | ||
276 | }); | 277 | }).exec(); |
277 | folderFuture.waitForFinished(); | 278 | folderFuture.waitForFinished(); |
278 | if (folderFuture.errorCode()) { | 279 | if (folderFuture.errorCode()) { |
279 | Warning() << "Folder sync failed."; | 280 | Warning() << "Folder sync failed."; |
@@ -293,7 +294,7 @@ public: | |||
293 | synchronizeMails(folder.normalizedPath(), messages); | 294 | synchronizeMails(folder.normalizedPath(), messages); |
294 | commit(); | 295 | commit(); |
295 | commitSync(); | 296 | commitSync(); |
296 | }); | 297 | }).exec(); |
297 | messagesFuture.waitForFinished(); | 298 | messagesFuture.waitForFinished(); |
298 | if (messagesFuture.errorCode()) { | 299 | if (messagesFuture.errorCode()) { |
299 | future.setError(1, "Folder sync failed: " + folder.normalizedPath()); | 300 | future.setError(1, "Folder sync failed: " + folder.normalizedPath()); |