From 8a7bde9b93208259de65d6b1aef21d21b495b6d7 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Tue, 2 Oct 2018 06:25:53 +0200 Subject: 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 --- src/location/places/qplacecategory.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') 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; } -- cgit v1.2.1