summaryrefslogtreecommitdiff
path: root/src/location/maps/qgeotiledmappingmanagerengine.cpp
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@theqtcompany.com>2016-07-01 15:00:03 +0200
committerPaolo Angelelli <paolo.angelelli@theqtcompany.com>2016-07-07 13:09:43 +0000
commitfd7ad01376b511ef1065ff832a7e41f15f6175b3 (patch)
treec04e0c7a03a3fb73cc875638faa0657d8d3c9cc7 /src/location/maps/qgeotiledmappingmanagerengine.cpp
parenteaf416e17fecee09c0b3f8d93b784fc3cf5806d2 (diff)
downloadqtlocation-fd7ad01376b511ef1065ff832a7e41f15f6175b3.tar.gz
Fix for caching after mapbox improvement/highdpi-support
Currently the qgeofiletilecache/qgeofiletilecachemapbox contains a bug in that it makes use of virtual functions in the constructor. This patch fixes it by moving those calls into a virtual init() method that is called by QGeoTiledMappingManagerEngine::setTileCache() Change-Id: Icf7932dfbae7d99eef22c67e034246a834212a03 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'src/location/maps/qgeotiledmappingmanagerengine.cpp')
-rw-r--r--src/location/maps/qgeotiledmappingmanagerengine.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/location/maps/qgeotiledmappingmanagerengine.cpp b/src/location/maps/qgeotiledmappingmanagerengine.cpp
index 4e777ab2..83b1c006 100644
--- a/src/location/maps/qgeotiledmappingmanagerengine.cpp
+++ b/src/location/maps/qgeotiledmappingmanagerengine.cpp
@@ -280,6 +280,7 @@ void QGeoTiledMappingManagerEngine::setTileCache(QAbstractGeoTileCache *cache)
Q_D(QGeoTiledMappingManagerEngine);
Q_ASSERT_X(!d->tileCache_, Q_FUNC_INFO, "This should be called only once");
d->tileCache_ = cache;
+ d->tileCache_->init();
}
QAbstractGeoTileCache *QGeoTiledMappingManagerEngine::tileCache()
@@ -290,6 +291,7 @@ QAbstractGeoTileCache *QGeoTiledMappingManagerEngine::tileCache()
if (!managerName().isEmpty())
cacheDirectory = QAbstractGeoTileCache::baseCacheDirectory() + managerName();
d->tileCache_ = new QGeoFileTileCache(cacheDirectory);
+ d->tileCache_->init();
}
return d->tileCache_;
}