summaryrefslogtreecommitdiffstats
path: root/tests/hawd
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2015-03-30 23:38:45 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2015-03-31 11:11:08 +0200
commit42f32ea5865c95028c577000e15e8a8631d16e74 (patch)
tree2d9e8a77ccccf088a8807f35f87e4264163d6cdd /tests/hawd
parent34851314d39307f22df01a4b711e6fd3c5618e23 (diff)
downloadsink-42f32ea5865c95028c577000e15e8a8631d16e74.tar.gz
sink-42f32ea5865c95028c577000e15e8a8631d16e74.zip
Storage: API cleanup/use QByteArray instead of std::string
Diffstat (limited to 'tests/hawd')
-rw-r--r--tests/hawd/dataset.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/hawd/dataset.cpp b/tests/hawd/dataset.cpp
index e1f9700..9f1d307 100644
--- a/tests/hawd/dataset.cpp
+++ b/tests/hawd/dataset.cpp
@@ -253,7 +253,7 @@ void Dataset::eachRow(const std::function<void(const Row &row)> &resultHandler)
253 } 253 }
254 254
255 Row row(*this); 255 Row row(*this);
256 m_storage.scan(nullptr, 0, 256 m_storage.scan("",
257 [&](void *key, int keySize, void *data, int dataSize) -> bool { 257 [&](void *key, int keySize, void *data, int dataSize) -> bool {
258 if (keySize != sizeof(qint64)) { 258 if (keySize != sizeof(qint64)) {
259 return true; 259 return true;
@@ -277,7 +277,7 @@ Dataset::Row Dataset::row(qint64 key)
277 } 277 }
278 278
279 Row row(*this, key); 279 Row row(*this, key);
280 m_storage.scan((const char *)&key, sizeof(qint64), 280 m_storage.scan(QByteArray::fromRawData((const char *)&key, sizeof(qint64)),
281 [&row](void *keyPtr, int keyLength, void *valuePtr, int valueSize) -> bool { 281 [&row](void *keyPtr, int keyLength, void *valuePtr, int valueSize) -> bool {
282 QByteArray array((const char*)valuePtr, valueSize); 282 QByteArray array((const char*)valuePtr, valueSize);
283 row.fromBinary(array); 283 row.fromBinary(array);