From 42f32ea5865c95028c577000e15e8a8631d16e74 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Mon, 30 Mar 2015 23:38:45 +0200 Subject: Storage: API cleanup/use QByteArray instead of std::string --- common/index.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'common/index.cpp') 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) void Index::lookup(const QByteArray &key, const std::function &resultHandler, const std::function &errorHandler) { - mStorage.scan(key.data(), key.size(), [this, resultHandler](void *keyPtr, int keySize, void *valuePtr, int valueSize) -> bool { + mStorage.scan(key, [this, resultHandler](void *keyPtr, int keySize, void *valuePtr, int valueSize) -> bool { resultHandler(QByteArray(static_cast(valuePtr), valueSize)); return true; }, [errorHandler](const Akonadi2::Storage::Error &error) { - qDebug() << "Error while retrieving value" << QString::fromStdString(error.message); + qDebug() << "Error while retrieving value" << error.message; errorHandler(Error(error.store, error.code, error.message)); } ); -- cgit v1.2.3