summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2018-02-07 16:36:30 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2018-02-07 22:00:25 +0100
commit8b430d214325110460cf69360d36ba567025c18b (patch)
tree11b4dcbed67c2e37f481861bf5fbb2b7cca9900e /common
parent95854555f038708ddb3fe2e7244deaa57e9a4b8c (diff)
downloadsink-8b430d214325110460cf69360d36ba567025c18b.tar.gz
sink-8b430d214325110460cf69360d36ba567025c18b.zip
Fixed warning
Diffstat (limited to 'common')
-rw-r--r--common/datastorequery.cpp8
-rw-r--r--common/typeindex.cpp4
2 files changed, 6 insertions, 6 deletions
diff --git a/common/datastorequery.cpp b/common/datastorequery.cpp
index f5152b7..870daf8 100644
--- a/common/datastorequery.cpp
+++ b/common/datastorequery.cpp
@@ -302,7 +302,7 @@ public:
302 auto selectionResult = reduceOnValue(reductionValue, aggregateValues); 302 auto selectionResult = reduceOnValue(reductionValue, aggregateValues);
303 303
304 mSelectedValues.insert(reductionValueBa, selectionResult); 304 mSelectedValues.insert(reductionValueBa, selectionResult);
305 readEntity(selectionResult, [&, this](const Sink::ApplicationDomain::ApplicationDomainType &entity, Sink::Operation operation) { 305 readEntity(selectionResult, [&](const Sink::ApplicationDomain::ApplicationDomainType &entity, Sink::Operation operation) {
306 callback({entity, operation, aggregateValues}); 306 callback({entity, operation, aggregateValues});
307 foundValue = true; 307 foundValue = true;
308 }); 308 });
@@ -320,18 +320,18 @@ public:
320 auto oldSelectionResult = mSelectedValues.take(reductionValueBa); 320 auto oldSelectionResult = mSelectedValues.take(reductionValueBa);
321 if (oldSelectionResult == selectionResult) { 321 if (oldSelectionResult == selectionResult) {
322 mSelectedValues.insert(reductionValueBa, selectionResult); 322 mSelectedValues.insert(reductionValueBa, selectionResult);
323 readEntity(selectionResult, [&, this](const Sink::ApplicationDomain::ApplicationDomainType &entity, Sink::Operation) { 323 readEntity(selectionResult, [&](const Sink::ApplicationDomain::ApplicationDomainType &entity, Sink::Operation) {
324 callback({entity, Sink::Operation_Modification, aggregateValues}); 324 callback({entity, Sink::Operation_Modification, aggregateValues});
325 }); 325 });
326 } else { 326 } else {
327 //remove old result 327 //remove old result
328 readEntity(oldSelectionResult, [&, this](const Sink::ApplicationDomain::ApplicationDomainType &entity, Sink::Operation) { 328 readEntity(oldSelectionResult, [&](const Sink::ApplicationDomain::ApplicationDomainType &entity, Sink::Operation) {
329 callback({entity, Sink::Operation_Removal}); 329 callback({entity, Sink::Operation_Removal});
330 }); 330 });
331 331
332 //add new result 332 //add new result
333 mSelectedValues.insert(reductionValueBa, selectionResult); 333 mSelectedValues.insert(reductionValueBa, selectionResult);
334 readEntity(selectionResult, [&, this](const Sink::ApplicationDomain::ApplicationDomainType &entity, Sink::Operation) { 334 readEntity(selectionResult, [&](const Sink::ApplicationDomain::ApplicationDomainType &entity, Sink::Operation) {
335 callback({entity, Sink::Operation_Creation, aggregateValues}); 335 callback({entity, Sink::Operation_Creation, aggregateValues});
336 }); 336 });
337 } 337 }
diff --git a/common/typeindex.cpp b/common/typeindex.cpp
index 5a19839..0228ecb 100644
--- a/common/typeindex.cpp
+++ b/common/typeindex.cpp
@@ -245,7 +245,7 @@ QVector<QByteArray> TypeIndex::lookup(const QByteArray &property, const QVariant
245 Index index(indexName(property), transaction); 245 Index index(indexName(property), transaction);
246 const auto lookupKey = getByteArray(value); 246 const auto lookupKey = getByteArray(value);
247 index.lookup( 247 index.lookup(
248 lookupKey, [&, this](const QByteArray &value) { keys << value; }, [property, this](const Index::Error &error) { SinkWarning() << "Error in index: " << error.message << property; }); 248 lookupKey, [&](const QByteArray &value) { keys << value; }, [property](const Index::Error &error) { SinkWarning() << "Error in index: " << error.message << property; });
249 SinkTraceCtx(mLogCtx) << "Index lookup on " << property << " found " << keys.size() << " keys."; 249 SinkTraceCtx(mLogCtx) << "Index lookup on " << property << " found " << keys.size() << " keys.";
250 return keys; 250 return keys;
251 } else if (mSecondaryProperties.contains(property)) { 251 } else if (mSecondaryProperties.contains(property)) {
@@ -257,7 +257,7 @@ QVector<QByteArray> TypeIndex::lookup(const QByteArray &property, const QVariant
257 Index index(indexName(property + resultProperty), transaction); 257 Index index(indexName(property + resultProperty), transaction);
258 const auto lookupKey = getByteArray(value); 258 const auto lookupKey = getByteArray(value);
259 index.lookup( 259 index.lookup(
260 lookupKey, [&, this](const QByteArray &value) { secondaryKeys << value; }, [property, this](const Index::Error &error) { SinkWarning() << "Error in index: " << error.message << property; }); 260 lookupKey, [&](const QByteArray &value) { secondaryKeys << value; }, [property](const Index::Error &error) { SinkWarning() << "Error in index: " << error.message << property; });
261 SinkTraceCtx(mLogCtx) << "Looked up secondary keys: " << secondaryKeys; 261 SinkTraceCtx(mLogCtx) << "Looked up secondary keys: " << secondaryKeys;
262 for (const auto &secondary : secondaryKeys) { 262 for (const auto &secondary : secondaryKeys) {
263 keys += lookup(resultProperty, secondary, transaction); 263 keys += lookup(resultProperty, secondary, transaction);