diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-06-13 09:48:24 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-06-13 09:48:24 +0200 |
commit | 29cca3919ed373c486c3c9acec32481918baeb58 (patch) | |
tree | 787e14ca37783f798682b09c199fdd108e705585 /common/entityreader.cpp | |
parent | 1e2e4437094d80f1cdd849c7341019910fc29fb1 (diff) | |
download | sink-29cca3919ed373c486c3c9acec32481918baeb58.tar.gz sink-29cca3919ed373c486c3c9acec32481918baeb58.zip |
Don't match invalid properties.
Diffstat (limited to 'common/entityreader.cpp')
-rw-r--r-- | common/entityreader.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/common/entityreader.cpp b/common/entityreader.cpp index a3ca8e2..c15f73f 100644 --- a/common/entityreader.cpp +++ b/common/entityreader.cpp | |||
@@ -375,14 +375,10 @@ EntityReader<DomainType>::getFilter(const QSet<QByteArray> remainingFilters, con | |||
375 | } | 375 | } |
376 | for (const auto &filterProperty : remainingFilters) { | 376 | for (const auto &filterProperty : remainingFilters) { |
377 | const auto property = domainObject->getProperty(filterProperty); | 377 | const auto property = domainObject->getProperty(filterProperty); |
378 | if (property.isValid()) { | 378 | const auto comparator = query.propertyFilter.value(filterProperty); |
379 | const auto comparator = query.propertyFilter.value(filterProperty); | 379 | if (!comparator.matches(property)) { |
380 | if (!comparator.matches(property)) { | 380 | Trace() << "Filtering entity due to property mismatch on filter: " << filterProperty << property << ":" << comparator.value; |
381 | Trace() << "Filtering entity due to property mismatch on filter: " << filterProperty << property << ":" << comparator.value; | 381 | return false; |
382 | return false; | ||
383 | } | ||
384 | } else { | ||
385 | Warning() << "Ignored property filter because value is invalid: " << filterProperty; | ||
386 | } | 382 | } |
387 | } | 383 | } |
388 | return true; | 384 | return true; |