From b187b95672fe0d8b16ba80bedd9022f1cda3a051 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Mon, 20 Jul 2015 16:15:49 +0200 Subject: Pass command around as QByteArray Simpler api, GenericResource didn't honor size anyways, and we copy the command for now to avoid sideeffects of data coming in in the meantime (although that should generally work since data is always appended). --- common/genericresource.cpp | 2 +- common/genericresource.h | 2 +- common/resource.cpp | 3 +-- common/resource.h | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) (limited to 'common') diff --git a/common/genericresource.cpp b/common/genericresource.cpp index 5dfa9b5..ae06ef4 100644 --- a/common/genericresource.cpp +++ b/common/genericresource.cpp @@ -194,7 +194,7 @@ void GenericResource::enqueueCommand(MessageQueue &mq, int commandId, const QByt mq.enqueue(m_fbb.GetBufferPointer(), m_fbb.GetSize()); } -void GenericResource::processCommand(int commandId, const QByteArray &data, uint size, Akonadi2::Pipeline *pipeline) +void GenericResource::processCommand(int commandId, const QByteArray &data, Akonadi2::Pipeline *pipeline) { //TODO instead of copying the command including the full entity first into the command queue, we could directly //create a new revision, only pushing a handle into the commandqueue with the relevant changeset (for changereplay). diff --git a/common/genericresource.h b/common/genericresource.h index c44989e..e9d5d59 100644 --- a/common/genericresource.h +++ b/common/genericresource.h @@ -37,7 +37,7 @@ public: GenericResource(const QByteArray &resourceInstanceIdentifier); virtual ~GenericResource(); - virtual void processCommand(int commandId, const QByteArray &data, uint size, Pipeline *pipeline) Q_DECL_OVERRIDE; + virtual void processCommand(int commandId, const QByteArray &data, Pipeline *pipeline) Q_DECL_OVERRIDE; virtual KAsync::Job synchronizeWithSource(Pipeline *pipeline) Q_DECL_OVERRIDE = 0; virtual KAsync::Job processAllMessages() Q_DECL_OVERRIDE; diff --git a/common/resource.cpp b/common/resource.cpp index bd69afd..40ad04c 100644 --- a/common/resource.cpp +++ b/common/resource.cpp @@ -44,11 +44,10 @@ void Resource::configurePipeline(Pipeline *pipeline) } -void Resource::processCommand(int commandId, const QByteArray &data, uint size, Pipeline *pipeline) +void Resource::processCommand(int commandId, const QByteArray &data, Pipeline *pipeline) { Q_UNUSED(commandId) Q_UNUSED(data) - Q_UNUSED(size) Q_UNUSED(pipeline) pipeline->null(); } diff --git a/common/resource.h b/common/resource.h index ebbc2e1..009050e 100644 --- a/common/resource.h +++ b/common/resource.h @@ -36,7 +36,7 @@ public: Resource(); virtual ~Resource(); - virtual void processCommand(int commandId, const QByteArray &data, uint size, Pipeline *pipeline); + virtual void processCommand(int commandId, const QByteArray &data, Pipeline *pipeline); virtual KAsync::Job synchronizeWithSource(Pipeline *pipeline); virtual KAsync::Job processAllMessages(); -- cgit v1.2.3