summaryrefslogtreecommitdiffstats
path: root/dummyresource/resourcefactory.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2014-12-24 02:15:41 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2014-12-24 02:15:41 +0100
commitc83c2ef64b5a1e4b1dc0102df36687caebb96ff0 (patch)
tree7d0567996c02e9a1ea5909abbab5f68401fd4771 /dummyresource/resourcefactory.cpp
parentd80ff84c28c0be626c1df4528741cddf5a55f547 (diff)
downloadsink-c83c2ef64b5a1e4b1dc0102df36687caebb96ff0.tar.gz
sink-c83c2ef64b5a1e4b1dc0102df36687caebb96ff0.zip
unifying buffer, and a better way to implement domain object adapters.
Diffstat (limited to 'dummyresource/resourcefactory.cpp')
-rw-r--r--dummyresource/resourcefactory.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/dummyresource/resourcefactory.cpp b/dummyresource/resourcefactory.cpp
index 2c43981..6b93985 100644
--- a/dummyresource/resourcefactory.cpp
+++ b/dummyresource/resourcefactory.cpp
@@ -103,7 +103,7 @@ void DummyResource::synchronizeWithSource(Akonadi2::Pipeline *pipeline)
103 const auto key = QUuid::createUuid().toString().toUtf8(); 103 const auto key = QUuid::createUuid().toString().toUtf8();
104 //TODO can we really just start populating the buffer and pass the buffer builder? 104 //TODO can we really just start populating the buffer and pass the buffer builder?
105 qDebug() << "new event"; 105 qDebug() << "new event";
106 pipeline->newEntity(key, m_fbb); 106 pipeline->newEntity(key, m_fbb.GetBufferPointer(), m_fbb.GetSize());
107 } else { //modification 107 } else { //modification
108 //TODO diff and create modification if necessary 108 //TODO diff and create modification if necessary
109 } 109 }
@@ -121,7 +121,7 @@ void DummyResource::processCommand(int commandId, const QByteArray &data, uint s
121 builder .add_summary(m_fbb.CreateString("summary summary!")); 121 builder .add_summary(m_fbb.CreateString("summary summary!"));
122 auto buffer = builder.Finish(); 122 auto buffer = builder.Finish();
123 DummyCalendar::FinishDummyEventBuffer(m_fbb, buffer); 123 DummyCalendar::FinishDummyEventBuffer(m_fbb, buffer);
124 pipeline->newEntity("fakekey", m_fbb); 124 pipeline->newEntity("fakekey", m_fbb.GetBufferPointer(), m_fbb.GetSize());
125 m_fbb.Clear(); 125 m_fbb.Clear();
126} 126}
127 127