diff options
Diffstat (limited to 'common/pipeline.cpp')
-rw-r--r-- | common/pipeline.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/common/pipeline.cpp b/common/pipeline.cpp index 18b6d51..10bae54 100644 --- a/common/pipeline.cpp +++ b/common/pipeline.cpp | |||
@@ -189,7 +189,6 @@ public: | |||
189 | Pipeline *pipeline; | 189 | Pipeline *pipeline; |
190 | Pipeline::Type type; | 190 | Pipeline::Type type; |
191 | QByteArray key; | 191 | QByteArray key; |
192 | Akonadi2::Entity *entity; | ||
193 | QVectorIterator<Preprocessor *> filterIt; | 192 | QVectorIterator<Preprocessor *> filterIt; |
194 | bool idle; | 193 | bool idle; |
195 | }; | 194 | }; |
@@ -240,11 +239,6 @@ Pipeline::Type PipelineState::type() const | |||
240 | return d->type; | 239 | return d->type; |
241 | } | 240 | } |
242 | 241 | ||
243 | const Akonadi2::Entity &PipelineState::entity() const | ||
244 | { | ||
245 | return *d->entity; | ||
246 | } | ||
247 | |||
248 | void PipelineState::step() | 242 | void PipelineState::step() |
249 | { | 243 | { |
250 | if (!d->pipeline) { | 244 | if (!d->pipeline) { |
@@ -253,7 +247,11 @@ void PipelineState::step() | |||
253 | 247 | ||
254 | d->idle = false; | 248 | d->idle = false; |
255 | if (d->filterIt.hasNext()) { | 249 | if (d->filterIt.hasNext()) { |
256 | d->filterIt.next()->process(*this); | 250 | d->pipeline->storage().scan(d->key.toStdString(), [this](void *keyValue, int keySize, void *dataValue, int dataSize) -> bool { |
251 | auto entity = Akonadi2::GetEntity(dataValue); | ||
252 | d->filterIt.next()->process(*this, *entity); | ||
253 | return false; | ||
254 | }); | ||
257 | } else { | 255 | } else { |
258 | d->pipeline->pipelineCompleted(*this); | 256 | d->pipeline->pipelineCompleted(*this); |
259 | } | 257 | } |
@@ -276,7 +274,7 @@ Preprocessor::~Preprocessor() | |||
276 | { | 274 | { |
277 | } | 275 | } |
278 | 276 | ||
279 | void Preprocessor::process(PipelineState state) | 277 | void Preprocessor::process(PipelineState state, const Akonadi2::Entity &) |
280 | { | 278 | { |
281 | processingCompleted(state); | 279 | processingCompleted(state); |
282 | } | 280 | } |