From 855a878bcc124f8949586b3656dcc6e545e18dc0 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Thu, 2 Jun 2016 13:35:40 +0200 Subject: Always return jobs, not futures. Otherwise the calls are not composable. --- examples/imapresource/imapresource.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'examples/imapresource/imapresource.cpp') 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 @@ #define DEBUG_AREA "resource.imap" using namespace Imap; +using namespace Sink; class MailPropertyExtractor : public Sink::Preprocessor { @@ -273,7 +274,7 @@ public: commitSync(); folderList << folders; - }); + }).exec(); folderFuture.waitForFinished(); if (folderFuture.errorCode()) { Warning() << "Folder sync failed."; @@ -293,7 +294,7 @@ public: synchronizeMails(folder.normalizedPath(), messages); commit(); commitSync(); - }); + }).exec(); messagesFuture.waitForFinished(); if (messagesFuture.errorCode()) { future.setError(1, "Folder sync failed: " + folder.normalizedPath()); -- cgit v1.2.3