diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/clientapi.h | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/common/clientapi.h b/common/clientapi.h index c1404da..aa47802 100644 --- a/common/clientapi.h +++ b/common/clientapi.h | |||
@@ -421,14 +421,7 @@ public: | |||
421 | //We have to bind an instance to the function callback. Since we use a shared pointer this keeps the result provider instance (and thus also the emitter) alive. | 421 | //We have to bind an instance to the function callback. Since we use a shared pointer this keeps the result provider instance (and thus also the emitter) alive. |
422 | std::function<void(const typename DomainType::Ptr &)> addCallback = std::bind(&ResultProvider<typename DomainType::Ptr>::add, resultSet, std::placeholders::_1); | 422 | std::function<void(const typename DomainType::Ptr &)> addCallback = std::bind(&ResultProvider<typename DomainType::Ptr>::add, resultSet, std::placeholders::_1); |
423 | //We copy the facade pointer to keep it alive | 423 | //We copy the facade pointer to keep it alive |
424 | //TODO JOBAPI: we should be able to just do, job = job.then(facade->load(..)) | 424 | job = job.then(facade->load(query, addCallback)); |
425 | job = job.then<void>([facade, query, addCallback](Async::Future<void> &future) { | ||
426 | Async::Job<void> j = facade->load(query, addCallback); | ||
427 | j.then<void>([&future, facade](Async::Future<void> &f) { | ||
428 | future.setFinished(); | ||
429 | f.setFinished(); | ||
430 | }).exec(); | ||
431 | }); | ||
432 | } | 425 | } |
433 | job.then<void>([/* eventloop, */resultSet](Async::Future<void> &future) { | 426 | job.then<void>([/* eventloop, */resultSet](Async::Future<void> &future) { |
434 | qDebug() << "Query complete"; | 427 | qDebug() << "Query complete"; |