summaryrefslogtreecommitdiff
path: root/src/plugins/geoservices
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@qt.io>2017-09-11 17:15:45 +0200
committerPaolo Angelelli <paolo.angelelli@qt.io>2017-09-11 17:16:16 +0200
commita0c7b93df620d9254aef3136da08adbc70752837 (patch)
tree0db63a9d7f693d5245056eb41a1128c5fec11187 /src/plugins/geoservices
parent3f2c6d8af0367c5e87eb38d348c99e2e2a2f0a76 (diff)
parentb13ff055eb64970f545ba590735a38652de7689b (diff)
downloadqtlocation-a0c7b93df620d9254aef3136da08adbc70752837.tar.gz
Merge remote-tracking branch 'origin/5.9' into 5.10v5.10.0-beta1
Change-Id: Ibcf748d5f0d172ad5c77bdcd41806009ff6914e3
Diffstat (limited to 'src/plugins/geoservices')
-rw-r--r--src/plugins/geoservices/osm/qgeotiledmappingmanagerengineosm.cpp15
-rw-r--r--src/plugins/geoservices/osm/qgeotileproviderosm.cpp2
2 files changed, 9 insertions, 8 deletions
diff --git a/src/plugins/geoservices/osm/qgeotiledmappingmanagerengineosm.cpp b/src/plugins/geoservices/osm/qgeotiledmappingmanagerengineosm.cpp
index 3f0062c0..9174ad62 100644
--- a/src/plugins/geoservices/osm/qgeotiledmappingmanagerengineosm.cpp
+++ b/src/plugins/geoservices/osm/qgeotiledmappingmanagerengineosm.cpp
@@ -220,15 +220,16 @@ QGeoTiledMappingManagerEngineOsm::QGeoTiledMappingManagerEngineOsm(const QVarian
if (parameters.contains(QStringLiteral("osm.mapping.providersrepository.disabled")))
disableRedirection = parameters.value(QStringLiteral("osm.mapping.providersrepository.disabled")).toBool();
- foreach (QGeoTileProviderOsm * provider, m_providers) {
+ for (QGeoTileProviderOsm * provider: qAsConst(m_providers)) {
// Providers are parented inside QGeoFileTileCacheOsm, as they are used in its destructor.
- if (disableRedirection)
+ if (disableRedirection) {
provider->disableRedirection();
-
- connect(provider, &QGeoTileProviderOsm::resolutionFinished,
- this, &QGeoTiledMappingManagerEngineOsm::onProviderResolutionFinished);
- connect(provider, &QGeoTileProviderOsm::resolutionError,
- this, &QGeoTiledMappingManagerEngineOsm::onProviderResolutionError);
+ } else {
+ connect(provider, &QGeoTileProviderOsm::resolutionFinished,
+ this, &QGeoTiledMappingManagerEngineOsm::onProviderResolutionFinished);
+ connect(provider, &QGeoTileProviderOsm::resolutionError,
+ this, &QGeoTiledMappingManagerEngineOsm::onProviderResolutionError);
+ }
}
updateMapTypes();
diff --git a/src/plugins/geoservices/osm/qgeotileproviderosm.cpp b/src/plugins/geoservices/osm/qgeotileproviderosm.cpp
index 95e5d44b..f7ab8c99 100644
--- a/src/plugins/geoservices/osm/qgeotileproviderosm.cpp
+++ b/src/plugins/geoservices/osm/qgeotileproviderosm.cpp
@@ -174,11 +174,11 @@ void QGeoTileProviderOsm::disableRedirection()
if (p->isValid() && !found) {
m_provider = p;
m_providerId = m_providerList.indexOf(p);
- m_status = Resolved;
found = true;
}
p->disconnect(this);
}
+ m_status = Resolved;
}
void QGeoTileProviderOsm::onResolutionFinished(TileProvider *provider)