summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2015-07-20 16:15:49 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2015-07-23 17:37:53 +0200
commitb187b95672fe0d8b16ba80bedd9022f1cda3a051 (patch)
treec86bf63c73eb91aca83a3d0c22be95b7a7515f0b /tests
parent4a71e5b06506af6e3ab7a7715705e76b6d6e9bb7 (diff)
downloadsink-b187b95672fe0d8b16ba80bedd9022f1cda3a051.tar.gz
sink-b187b95672fe0d8b16ba80bedd9022f1cda3a051.zip
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).
Diffstat (limited to 'tests')
-rw-r--r--tests/dummyresourcebenchmark.cpp2
-rw-r--r--tests/dummyresourcetest.cpp4
2 files changed, 3 insertions, 3 deletions
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:
133 const QByteArray command(reinterpret_cast<const char *>(fbb.GetBufferPointer()), fbb.GetSize()); 133 const QByteArray command(reinterpret_cast<const char *>(fbb.GetBufferPointer()), fbb.GetSize());
134 134
135 for (int i = 0; i < num; i++) { 135 for (int i = 0; i < num; i++) {
136 resource.processCommand(Akonadi2::Commands::CreateEntityCommand, command, command.size(), &pipeline); 136 resource.processCommand(Akonadi2::Commands::CreateEntityCommand, command, &pipeline);
137 } 137 }
138 auto appendTime = time.elapsed(); 138 auto appendTime = time.elapsed();
139 139
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:
89 QSignalSpy revisionSpy(&pipeline, SIGNAL(revisionUpdated())); 89 QSignalSpy revisionSpy(&pipeline, SIGNAL(revisionUpdated()));
90 DummyResource resource("org.kde.dummy.instance1"); 90 DummyResource resource("org.kde.dummy.instance1");
91 resource.configurePipeline(&pipeline); 91 resource.configurePipeline(&pipeline);
92 resource.processCommand(Akonadi2::Commands::CreateEntityCommand, command, command.size(), &pipeline); 92 resource.processCommand(Akonadi2::Commands::CreateEntityCommand, command, &pipeline);
93 resource.processCommand(Akonadi2::Commands::CreateEntityCommand, command, command.size(), &pipeline); 93 resource.processCommand(Akonadi2::Commands::CreateEntityCommand, command, &pipeline);
94 94
95 QVERIFY(revisionSpy.isValid()); 95 QVERIFY(revisionSpy.isValid());
96 QTRY_COMPARE(revisionSpy.count(), 2); 96 QTRY_COMPARE(revisionSpy.count(), 2);