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). --- tests/dummyresourcebenchmark.cpp | 2 +- tests/dummyresourcetest.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/dummyresourcebenchmark.cpp b/tests/dummyresourcebenchmark.cpp index fd2cb01..7d40779 100644 --- a/tests/dummyresourcebenchmark.cpp +++ b/tests/dummyresourcebenchmark.cpp @@ -133,7 +133,7 @@ private Q_SLOTS: const QByteArray command(reinterpret_cast(fbb.GetBufferPointer()), fbb.GetSize()); for (int i = 0; i < num; i++) { - resource.processCommand(Akonadi2::Commands::CreateEntityCommand, command, command.size(), &pipeline); + resource.processCommand(Akonadi2::Commands::CreateEntityCommand, command, &pipeline); } auto appendTime = time.elapsed(); diff --git a/tests/dummyresourcetest.cpp b/tests/dummyresourcetest.cpp index 7499d62..36812c1 100644 --- a/tests/dummyresourcetest.cpp +++ b/tests/dummyresourcetest.cpp @@ -89,8 +89,8 @@ private Q_SLOTS: QSignalSpy revisionSpy(&pipeline, SIGNAL(revisionUpdated())); DummyResource resource("org.kde.dummy.instance1"); resource.configurePipeline(&pipeline); - resource.processCommand(Akonadi2::Commands::CreateEntityCommand, command, command.size(), &pipeline); - resource.processCommand(Akonadi2::Commands::CreateEntityCommand, command, command.size(), &pipeline); + resource.processCommand(Akonadi2::Commands::CreateEntityCommand, command, &pipeline); + resource.processCommand(Akonadi2::Commands::CreateEntityCommand, command, &pipeline); QVERIFY(revisionSpy.isValid()); QTRY_COMPARE(revisionSpy.count(), 2); -- cgit v1.2.3