summaryrefslogtreecommitdiff
path: root/src/plugins/geoservices/mapbox
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@theqtcompany.com>2016-08-01 19:44:41 +0200
committerPaolo Angelelli <paolo.angelelli@theqtcompany.com>2016-08-04 10:07:41 +0000
commit6f34c2ac75bdbfb679b5f4767006ad6a373cabb1 (patch)
tree7138df39343d265f07c5bc7c013986a7410b3652 /src/plugins/geoservices/mapbox
parentd031c0f7b13bb07227210632f66adceef71dc5bb (diff)
downloadqtlocation-6f34c2ac75bdbfb679b5f4767006ad6a373cabb1.tar.gz
Version tile cache with qt version and evict obsolete data on init()
This patch changes the base cache directory to a new scheme containing the qt version. At the time of commit, this would be "QtLocation/5.8/tiles/" This versioning does not have to change at every release, but when there are changes in the caching scheme. The reason for this is that, otherwise, it becomes difficult to clean up old cache data. QGeoFileTileCache::init already clean up old tile cache from 5.4 or older, where the cache data wasn't organized under a directory for each plugin. In 5.8 different naming scheme are introduced for mapbox tiles (with @1x,@2x) , here maps (with ppi), and soon for OSM too (with an identifier for the actual provider, not only the mapId). With this patch it will become easier and cleaner to upgrade the cache data without leaving residues. Change-Id: I89aeac0aaf1408d119cde5792fc69a64d5d89c3a Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/plugins/geoservices/mapbox')
-rw-r--r--src/plugins/geoservices/mapbox/qgeotiledmappingmanagerenginemapbox.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/geoservices/mapbox/qgeotiledmappingmanagerenginemapbox.cpp b/src/plugins/geoservices/mapbox/qgeotiledmappingmanagerenginemapbox.cpp
index 2bf756fc..78c76b40 100644
--- a/src/plugins/geoservices/mapbox/qgeotiledmappingmanagerenginemapbox.cpp
+++ b/src/plugins/geoservices/mapbox/qgeotiledmappingmanagerenginemapbox.cpp
@@ -126,7 +126,7 @@ QGeoTiledMappingManagerEngineMapbox::QGeoTiledMappingManagerEngineMapbox(const Q
m_cacheDirectory = parameters.value(QStringLiteral("mapbox.cache.directory")).toString();
} else {
// managerName() is not yet set, we have to hardcode the plugin name below
- m_cacheDirectory = QAbstractGeoTileCache::baseCacheDirectory() + QLatin1String("mapbox");
+ m_cacheDirectory = QAbstractGeoTileCache::baseLocationCacheDirectory() + QLatin1String("mapbox");
}
// The Mapbox free plan allows for 6000 tiles to be stored for offline uses