summaryrefslogtreecommitdiffstats
path: root/common/pipeline.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/pipeline.cpp')
-rw-r--r--common/pipeline.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/common/pipeline.cpp b/common/pipeline.cpp
index cf508c5..739909d 100644
--- a/common/pipeline.cpp
+++ b/common/pipeline.cpp
@@ -31,7 +31,7 @@ class Pipeline::Private
31{ 31{
32public: 32public:
33 Private(const QString &resourceName) 33 Private(const QString &resourceName)
34 : storage(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + "/akonadi2/storage", resourceName), 34 : storage(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + "/akonadi2/storage", resourceName, Storage::ReadWrite),
35 stepScheduled(false) 35 stepScheduled(false)
36 { 36 {
37 } 37 }
@@ -71,6 +71,11 @@ void Pipeline::null()
71 71
72void Pipeline::newEntity(const QByteArray &key, flatbuffers::FlatBufferBuilder &entity) 72void Pipeline::newEntity(const QByteArray &key, flatbuffers::FlatBufferBuilder &entity)
73{ 73{
74 const qint64 newRevision = storage().maxRevision() + 1;
75 //FIXME this should go into a preprocessor
76 storage().write(key, key.size(), reinterpret_cast<char*>(entity.GetBufferPointer()), entity.GetSize());
77 storage().setMaxRevision(newRevision);
78
74 PipelineState state(this, NewPipeline, key, d->newPipeline); 79 PipelineState state(this, NewPipeline, key, d->newPipeline);
75 d->activePipelines << state; 80 d->activePipelines << state;
76 state.step(); 81 state.step();