summaryrefslogtreecommitdiff
path: root/src/location/maps/qgeotiledmap.cpp
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@qt.io>2017-03-21 17:13:19 +0100
committerPaolo Angelelli <paolo.angelelli@qt.io>2017-03-27 11:22:29 +0000
commit2e79bbca6465d404a821510c7a6b897fd284ca99 (patch)
tree67f599ca88cbdccd11974194584b9430e7a51a16 /src/location/maps/qgeotiledmap.cpp
parent02c1b7eabaab6f7b2262ab34ac46c8aeeb09f064 (diff)
downloadqtlocation-2e79bbca6465d404a821510c7a6b897fd284ca99.tar.gz
Allow to disable prefetching
Add a NoPrefetch PrefetchStyle to allow disabling the prefetching. A new parameter in the geoservice plugin is then needed to effectively disable it. Change-Id: I8b8a2343cbe4f59bd990d25c3381f4a11708860e Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/location/maps/qgeotiledmap.cpp')
-rw-r--r--src/location/maps/qgeotiledmap.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/location/maps/qgeotiledmap.cpp b/src/location/maps/qgeotiledmap.cpp
index 450cdd44..340bf0ad 100644
--- a/src/location/maps/qgeotiledmap.cpp
+++ b/src/location/maps/qgeotiledmap.cpp
@@ -199,7 +199,7 @@ QGeoTiledMapPrivate::~QGeoTiledMapPrivate()
void QGeoTiledMapPrivate::prefetchTiles()
{
- if (m_tileRequests) {
+ if (m_tileRequests && m_prefetchStyle != QGeoTiledMap::NoPrefetching) {
QSet<QGeoTileSpec> tiles;
QGeoCameraData camera = m_visibleTiles->cameraData();
@@ -242,8 +242,11 @@ void QGeoTiledMapPrivate::prefetchTiles()
m_prefetchTiles->setViewExpansion(1.0);
tiles += m_prefetchTiles->createTiles();
}
-
}
+ break;
+
+ default:
+ break;
}
m_tileRequests->requestTiles(tiles - m_mapScene->texturedTiles());