summaryrefslogtreecommitdiff
path: root/src/plugins/geoservices/mapbox/qplacesearchreplymapbox.cpp
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-12-10 13:20:09 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-12-10 13:20:09 +0100
commitb4966afc91fa82315f0ae9b11f54f52f20183e9b (patch)
tree982cc9c73dbec9af725eaecca9cd7d6986e59c65 /src/plugins/geoservices/mapbox/qplacesearchreplymapbox.cpp
parent3d38d96c44d376a10cbe140f7b7c6866bd203471 (diff)
parentde6da4d9a94d35ecb05dd69b188f795a5afd577c (diff)
downloadqtlocation-b4966afc91fa82315f0ae9b11f54f52f20183e9b.tar.gz
Merge remote-tracking branch 'origin/5.11' into 5.12
Conflicts: .qmake.conf Change-Id: Ifd3514a958d0df4320b253c26e3da3a632088be8
Diffstat (limited to 'src/plugins/geoservices/mapbox/qplacesearchreplymapbox.cpp')
-rw-r--r--src/plugins/geoservices/mapbox/qplacesearchreplymapbox.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/plugins/geoservices/mapbox/qplacesearchreplymapbox.cpp b/src/plugins/geoservices/mapbox/qplacesearchreplymapbox.cpp
index a79af1cb..b2f2f043 100644
--- a/src/plugins/geoservices/mapbox/qplacesearchreplymapbox.cpp
+++ b/src/plugins/geoservices/mapbox/qplacesearchreplymapbox.cpp
@@ -188,19 +188,18 @@ void QPlaceSearchReplyMapbox::onReplyFinished()
if (!categories.isEmpty()) {
const QList<QPlaceCategory> placeCategories = placeResult.place().categories();
+ bool categoryMatch = false;
if (!placeCategories.isEmpty()) {
- bool categoryMatch = false;
for (const QPlaceCategory &placeCategory : placeCategories) {
if (categories.contains(placeCategory)) {
categoryMatch = true;
break;
}
}
- if (!categoryMatch)
- continue;
}
+ if (!categoryMatch)
+ continue;
}
-
placeResult.setDistance(searchCenter.distanceTo(placeResult.place().location().coordinate()));
results.append(placeResult);
}