From a044a7f0ea054502fb8b6aedcfa213b192a7b05a Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Mon, 27 Apr 2015 00:38:36 +0200 Subject: Fixed lifetime management of resultSet. The resultSet remains valid for the duration of the thread. We keep the thread running until the ResultEmitter is deleted. --- tests/clientapitest.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/clientapitest.cpp b/tests/clientapitest.cpp index 057495e..1a5d873 100644 --- a/tests/clientapitest.cpp +++ b/tests/clientapitest.cpp @@ -61,10 +61,7 @@ public: resultProvider->clear(); //rerun query std::function addCallback = std::bind(&Akonadi2::ResultProvider::add, resultProvider, std::placeholders::_1); - load(query, addCallback).then([resultProvider, &future](qint64 queriedRevision) { - //TODO set revision in result provider? - //TODO update all existing results with new revision - resultProvider->complete(); + load(query, addCallback).then([resultProvider, &future, query](qint64 queriedRevision) { future.setValue(queriedRevision); future.setFinished(); }).exec(); -- cgit v1.2.3