summaryrefslogtreecommitdiffstats
path: root/common/resourcefacade.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-04-09 20:23:07 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-04-09 20:23:07 +0200
commit6b5ec926275ec3d0431ce74c5c5af905f407aa24 (patch)
tree7f4729ccfe5372dbeebca3b0ec34234b885ffd30 /common/resourcefacade.cpp
parentf4fe90eee542ae1482056c8eab4a830cae4974b7 (diff)
downloadsink-6b5ec926275ec3d0431ce74c5c5af905f407aa24.tar.gz
sink-6b5ec926275ec3d0431ce74c5c5af905f407aa24.zip
Treat the type filter specially
Because otherwise the filter will never match if we filter by type.
Diffstat (limited to 'common/resourcefacade.cpp')
-rw-r--r--common/resourcefacade.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/common/resourcefacade.cpp b/common/resourcefacade.cpp
index 35f7f46..4bf4962 100644
--- a/common/resourcefacade.cpp
+++ b/common/resourcefacade.cpp
@@ -97,6 +97,9 @@ KAsync::Job<void> ResourceFacade::remove(const Sink::ApplicationDomain::SinkReso
97static bool matchesFilter(const QHash<QByteArray, QVariant> &filter, const QMap<QByteArray, QVariant> &properties) 97static bool matchesFilter(const QHash<QByteArray, QVariant> &filter, const QMap<QByteArray, QVariant> &properties)
98{ 98{
99 for (const auto &filterProperty : filter.keys()) { 99 for (const auto &filterProperty : filter.keys()) {
100 if (filterProperty == "type") {
101 continue;
102 }
100 if (filter.value(filterProperty).toByteArray() != properties.value(filterProperty).toByteArray()) { 103 if (filter.value(filterProperty).toByteArray() != properties.value(filterProperty).toByteArray()) {
101 return false; 104 return false;
102 } 105 }