summaryrefslogtreecommitdiffstats
path: root/common/index.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/index.cpp')
-rw-r--r--common/index.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/index.cpp b/common/index.cpp
index 7b0c682..9bb467b 100644
--- a/common/index.cpp
+++ b/common/index.cpp
@@ -17,12 +17,12 @@ void Index::add(const QByteArray &key, const QByteArray &value)
17void Index::lookup(const QByteArray &key, const std::function<void(const QByteArray &value)> &resultHandler, 17void Index::lookup(const QByteArray &key, const std::function<void(const QByteArray &value)> &resultHandler,
18 const std::function<void(const Error &error)> &errorHandler) 18 const std::function<void(const Error &error)> &errorHandler)
19{ 19{
20 mStorage.scan(key.data(), key.size(), [this, resultHandler](void *keyPtr, int keySize, void *valuePtr, int valueSize) -> bool { 20 mStorage.scan(key, [this, resultHandler](void *keyPtr, int keySize, void *valuePtr, int valueSize) -> bool {
21 resultHandler(QByteArray(static_cast<char*>(valuePtr), valueSize)); 21 resultHandler(QByteArray(static_cast<char*>(valuePtr), valueSize));
22 return true; 22 return true;
23 }, 23 },
24 [errorHandler](const Akonadi2::Storage::Error &error) { 24 [errorHandler](const Akonadi2::Storage::Error &error) {
25 qDebug() << "Error while retrieving value" << QString::fromStdString(error.message); 25 qDebug() << "Error while retrieving value" << error.message;
26 errorHandler(Error(error.store, error.code, error.message)); 26 errorHandler(Error(error.store, error.code, error.message));
27 } 27 }
28 ); 28 );