summaryrefslogtreecommitdiffstats
path: root/common/pipeline.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/pipeline.cpp')
-rw-r--r--common/pipeline.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/common/pipeline.cpp b/common/pipeline.cpp
index d850154..f8b1fb1 100644
--- a/common/pipeline.cpp
+++ b/common/pipeline.cpp
@@ -159,14 +159,7 @@ KAsync::Job<qint64> Pipeline::newEntity(void const *command, size_t size)
159 QByteArray key; 159 QByteArray key;
160 if (createEntity->entityId()) { 160 if (createEntity->entityId()) {
161 key = QByteArray(reinterpret_cast<char const*>(createEntity->entityId()->Data()), createEntity->entityId()->size()); 161 key = QByteArray(reinterpret_cast<char const*>(createEntity->entityId()->Data()), createEntity->entityId()->size());
162 162 if (d->transaction.openDatabase(bufferType + ".main").contains(key)) {
163 bool found = false;
164 d->transaction.openDatabase(bufferType + ".main").scan(key, [&found](const QByteArray &, const QByteArray &value) -> bool {
165 found = true;
166 return false;
167 }, [this](const Akonadi2::Storage::Error &error) {
168 }, true);
169 if (found) {
170 ErrorMsg() << "An entity with this id already exists: " << key; 163 ErrorMsg() << "An entity with this id already exists: " << key;
171 return KAsync::error<qint64>(0); 164 return KAsync::error<qint64>(0);
172 } 165 }