diff options
Diffstat (limited to 'common/queryrunner.cpp')
-rw-r--r-- | common/queryrunner.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/common/queryrunner.cpp b/common/queryrunner.cpp index 718586f..2de3c10 100644 --- a/common/queryrunner.cpp +++ b/common/queryrunner.cpp | |||
@@ -201,7 +201,7 @@ ResultSet QueryRunner<DomainType>::filterSet(const ResultSet &resultSet, const s | |||
201 | 201 | ||
202 | //Read through the source values and return whatever matches the filter | 202 | //Read through the source values and return whatever matches the filter |
203 | std::function<bool(std::function<void(const Akonadi2::ApplicationDomain::ApplicationDomainType::Ptr &, Akonadi2::Operation)>)> generator = [this, resultSetPtr, &db, filter, initialQuery](std::function<void(const Akonadi2::ApplicationDomain::ApplicationDomainType::Ptr &, Akonadi2::Operation)> callback) -> bool { | 203 | std::function<bool(std::function<void(const Akonadi2::ApplicationDomain::ApplicationDomainType::Ptr &, Akonadi2::Operation)>)> generator = [this, resultSetPtr, &db, filter, initialQuery](std::function<void(const Akonadi2::ApplicationDomain::ApplicationDomainType::Ptr &, Akonadi2::Operation)> callback) -> bool { |
204 | while (resultSetPtr->next()) { | 204 | if (resultSetPtr->next()) { |
205 | //readEntity is only necessary if we actually want to filter or know the operation type (but not a big deal if we do it always I guess) | 205 | //readEntity is only necessary if we actually want to filter or know the operation type (but not a big deal if we do it always I guess) |
206 | readEntity(db, resultSetPtr->id(), [this, filter, callback, initialQuery](const Akonadi2::ApplicationDomain::ApplicationDomainType::Ptr &domainObject, Akonadi2::Operation operation) { | 206 | readEntity(db, resultSetPtr->id(), [this, filter, callback, initialQuery](const Akonadi2::ApplicationDomain::ApplicationDomainType::Ptr &domainObject, Akonadi2::Operation operation) { |
207 | //Always remove removals, they probably don't match due to non-available properties | 207 | //Always remove removals, they probably don't match due to non-available properties |
@@ -216,8 +216,10 @@ ResultSet QueryRunner<DomainType>::filterSet(const ResultSet &resultSet, const s | |||
216 | } | 216 | } |
217 | } | 217 | } |
218 | }); | 218 | }); |
219 | return true; | ||
220 | } else { | ||
221 | return false; | ||
219 | } | 222 | } |
220 | return false; | ||
221 | }; | 223 | }; |
222 | return ResultSet(generator); | 224 | return ResultSet(generator); |
223 | } | 225 | } |