summaryrefslogtreecommitdiffstats
path: root/common/resourceaccess.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/resourceaccess.cpp')
-rw-r--r--common/resourceaccess.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/common/resourceaccess.cpp b/common/resourceaccess.cpp
index 33820af..458694f 100644
--- a/common/resourceaccess.cpp
+++ b/common/resourceaccess.cpp
@@ -293,13 +293,14 @@ KAsync::Job<void> ResourceAccess::synchronizeResource(bool sourceSync, bool loca
293 return sendCommand(Commands::SynchronizeCommand, fbb); 293 return sendCommand(Commands::SynchronizeCommand, fbb);
294} 294}
295 295
296KAsync::Job<void> ResourceAccess::sendCreateCommand(const QByteArray &resourceBufferType, const QByteArray &buffer) 296KAsync::Job<void> ResourceAccess::sendCreateCommand(const QByteArray &uid, const QByteArray &resourceBufferType, const QByteArray &buffer)
297{ 297{
298 flatbuffers::FlatBufferBuilder fbb; 298 flatbuffers::FlatBufferBuilder fbb;
299 auto entityId = fbb.CreateString(uid.constData());
299 // This is the resource buffer type and not the domain type 300 // This is the resource buffer type and not the domain type
300 auto type = fbb.CreateString(resourceBufferType.constData()); 301 auto type = fbb.CreateString(resourceBufferType.constData());
301 auto delta = Sink::EntityBuffer::appendAsVector(fbb, buffer.constData(), buffer.size()); 302 auto delta = Sink::EntityBuffer::appendAsVector(fbb, buffer.constData(), buffer.size());
302 auto location = Sink::Commands::CreateCreateEntity(fbb, 0, type, delta); 303 auto location = Sink::Commands::CreateCreateEntity(fbb, entityId, type, delta);
303 Sink::Commands::FinishCreateEntityBuffer(fbb, location); 304 Sink::Commands::FinishCreateEntityBuffer(fbb, location);
304 open(); 305 open();
305 return sendCommand(Sink::Commands::CreateEntityCommand, fbb); 306 return sendCommand(Sink::Commands::CreateEntityCommand, fbb);