From 9c3d000e11d3b1fc6c6c205fe9e7ea26c11092c6 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Sun, 23 Aug 2015 23:57:09 +0200 Subject: Removed convenience API --- tests/storagebenchmark.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/storagebenchmark.cpp') diff --git a/tests/storagebenchmark.cpp b/tests/storagebenchmark.cpp index f143c4d..e6ab049 100644 --- a/tests/storagebenchmark.cpp +++ b/tests/storagebenchmark.cpp @@ -98,7 +98,7 @@ private Q_SLOTS: if (store) { auto transaction = store->createTransaction(Akonadi2::Storage::ReadWrite); for (int i = 0; i < count; i++) { - transaction.write(keyPrefix + QByteArray::number(i), event); + transaction.openDatabase().write(keyPrefix + QByteArray::number(i), event); if ((i % 10000) == 0) { transaction.commit(); transaction = store->createTransaction(Akonadi2::Storage::ReadWrite); @@ -149,7 +149,7 @@ private Q_SLOTS: QBENCHMARK { int hit = 0; - store->createTransaction(Akonadi2::Storage::ReadOnly).scan("", [&](const QByteArray &key, const QByteArray &value) -> bool { + store->createTransaction(Akonadi2::Storage::ReadOnly).openDatabase().scan("", [&](const QByteArray &key, const QByteArray &value) -> bool { if (key == "key10000") { //qDebug() << "hit"; hit++; @@ -166,7 +166,7 @@ private Q_SLOTS: QBENCHMARK { int hit = 0; - store->createTransaction(Akonadi2::Storage::ReadOnly).scan("key40000", [&](const QByteArray &key, const QByteArray &value) -> bool { + store->createTransaction(Akonadi2::Storage::ReadOnly).openDatabase().scan("key40000", [&](const QByteArray &key, const QByteArray &value) -> bool { hit++; return true; }); -- cgit v1.2.3