diff options
author | Andy Shaw <andy.shaw@qt.io> | 2018-10-02 06:25:53 +0200 |
---|---|---|
committer | Andy Shaw <andy.shaw@qt.io> | 2018-10-02 08:14:30 +0000 |
commit | 8a7bde9b93208259de65d6b1aef21d21b495b6d7 (patch) | |
tree | 6a301c1e1e3cc84d9cfa36e46a93d8c2c9432635 /src/location | |
parent | ce1767d724e26012cfcd2eae0143ec9a87984046 (diff) | |
download | qtlocation-8a7bde9b93208259de65d6b1aef21d21b495b6d7.tar.gz |
If a category has UnspecifiedVisibility then we should still match
Since it is possible that a category has unspecified visibility then
when comparing we still want to match on those. Otherwise it can end up
not finding any matches as a result.
Change-Id: I586bc3c1c91502ff56ea2974ab87a5dddc9d1263
Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
Diffstat (limited to 'src/location')
-rw-r--r-- | src/location/places/qplacecategory.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/location/places/qplacecategory.cpp b/src/location/places/qplacecategory.cpp index 5629631a..1ad70dab 100644 --- a/src/location/places/qplacecategory.cpp +++ b/src/location/places/qplacecategory.cpp @@ -139,7 +139,9 @@ bool QPlaceCategory::operator==(const QPlaceCategory &other) const { return d->categoryId == other.d->categoryId && d->name == other.d->name && - d->visibility == other.d->visibility && + (d->visibility != QLocation::UnspecifiedVisibility || + other.d->visibility != QLocation::UnspecifiedVisibility || + d->visibility == other.d->visibility) && d->icon == other.d->icon; } |