diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-03-30 23:38:45 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-03-31 11:11:08 +0200 |
commit | 42f32ea5865c95028c577000e15e8a8631d16e74 (patch) | |
tree | 2d9e8a77ccccf088a8807f35f87e4264163d6cdd /common/messagequeue.cpp | |
parent | 34851314d39307f22df01a4b711e6fd3c5618e23 (diff) | |
download | sink-42f32ea5865c95028c577000e15e8a8631d16e74.tar.gz sink-42f32ea5865c95028c577000e15e8a8631d16e74.zip |
Storage: API cleanup/use QByteArray instead of std::string
Diffstat (limited to 'common/messagequeue.cpp')
-rw-r--r-- | common/messagequeue.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/messagequeue.cpp b/common/messagequeue.cpp index 76f8162..add4759 100644 --- a/common/messagequeue.cpp +++ b/common/messagequeue.cpp | |||
@@ -23,7 +23,7 @@ void MessageQueue::dequeue(const std::function<void(void *ptr, int size, std::fu | |||
23 | const std::function<void(const Error &error)> &errorHandler) | 23 | const std::function<void(const Error &error)> &errorHandler) |
24 | { | 24 | { |
25 | bool readValue = false; | 25 | bool readValue = false; |
26 | mStorage.scan("", 0, [this, resultHandler, &readValue](void *keyPtr, int keySize, void *valuePtr, int valueSize) -> bool { | 26 | mStorage.scan("", [this, resultHandler, &readValue](void *keyPtr, int keySize, void *valuePtr, int valueSize) -> bool { |
27 | const auto key = QByteArray::fromRawData(static_cast<char*>(keyPtr), keySize); | 27 | const auto key = QByteArray::fromRawData(static_cast<char*>(keyPtr), keySize); |
28 | if (Akonadi2::Storage::isInternalKey(key)) { | 28 | if (Akonadi2::Storage::isInternalKey(key)) { |
29 | return true; | 29 | return true; |
@@ -42,7 +42,7 @@ void MessageQueue::dequeue(const std::function<void(void *ptr, int size, std::fu | |||
42 | return false; | 42 | return false; |
43 | }, | 43 | }, |
44 | [errorHandler](const Akonadi2::Storage::Error &error) { | 44 | [errorHandler](const Akonadi2::Storage::Error &error) { |
45 | qDebug() << "Error while retrieving value" << QString::fromStdString(error.message); | 45 | qDebug() << "Error while retrieving value" << error.message; |
46 | errorHandler(Error(error.store, error.code, error.message)); | 46 | errorHandler(Error(error.store, error.code, error.message)); |
47 | } | 47 | } |
48 | ); | 48 | ); |