diff options
author | Kari Oikarinen <kari.oikarinen@qt.io> | 2019-01-08 08:18:31 +0200 |
---|---|---|
committer | Kari Oikarinen <kari.oikarinen@qt.io> | 2019-01-08 08:18:31 +0200 |
commit | f1dd13632651a9efd0ea976a3efdd9c555a34bc2 (patch) | |
tree | c647c2741ed1be32c8ad8dac6c962fc79bf17fe4 /src/plugins/geoservices/mapbox/qplacesearchreplymapbox.cpp | |
parent | 4ab5838d9ba26eef2b2156bbf9cd428547bbebe0 (diff) | |
parent | 1688c44d223145abfdca19a7b31faecbafb0d315 (diff) | |
download | qtlocation-f1dd13632651a9efd0ea976a3efdd9c555a34bc2.tar.gz |
Merge 5.12 into 5.12.1
Change-Id: Ib65445a9e316252e7483d2878b8cdad252242177
Diffstat (limited to 'src/plugins/geoservices/mapbox/qplacesearchreplymapbox.cpp')
-rw-r--r-- | src/plugins/geoservices/mapbox/qplacesearchreplymapbox.cpp | 7 |
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); } |