summaryrefslogtreecommitdiffstats
path: root/common/query.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/query.cpp')
-rw-r--r--common/query.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/common/query.cpp b/common/query.cpp
index 5f6d095..404a304 100644
--- a/common/query.cpp
+++ b/common/query.cpp
@@ -132,8 +132,8 @@ bool QueryBase::Filter::operator==(const QueryBase::Filter &other) const
132 132
133bool QueryBase::operator==(const QueryBase &other) const 133bool QueryBase::operator==(const QueryBase &other) const
134{ 134{
135 auto ret = mType == other.mType 135 auto ret = mType == other.mType
136 && mSortProperty == other.mSortProperty 136 && mSortProperty == other.mSortProperty
137 && mBaseFilterStage == other.mBaseFilterStage; 137 && mBaseFilterStage == other.mBaseFilterStage;
138 return ret; 138 return ret;
139} 139}
@@ -171,6 +171,14 @@ bool QueryBase::Comparator::matches(const QVariant &v) const
171 return false; 171 return false;
172 } 172 }
173 return value.value<QByteArrayList>().contains(v.toByteArray()); 173 return value.value<QByteArrayList>().contains(v.toByteArray());
174 case Within: {
175 auto range = value.value<QList<QVariant>>();
176 if (range.size() < 2) {
177 return false;
178 }
179
180 return range[0] <= v && v <= range[1];
181 }
174 case Fulltext: 182 case Fulltext:
175 case Invalid: 183 case Invalid:
176 default: 184 default: