diff options
author | Harald Meyer <dev@meh.at> | 2015-11-18 08:10:41 +0100 |
---|---|---|
committer | Harald Meyer <dev@meh.at> | 2015-11-18 08:57:13 +0000 |
commit | 76481db8fd0c5ee88c3c7941fb0af6e0464508dc (patch) | |
tree | 5957dee31d747fb566a1c69cf629930c1784f031 | |
parent | 83065c750b428c1c695821a4fdc02a259d392645 (diff) | |
download | qtlocation-76481db8fd0c5ee88c3c7941fb0af6e0464508dc.tar.gz |
Do not cache empty tiles.
With this update tiles which failed to load and have zero data are not
saved (cached).
Change-Id: I580db9096553d403d89c135bcf90ac5fb4c97fe8
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
-rw-r--r-- | src/location/maps/qgeofiletilecache.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/location/maps/qgeofiletilecache.cpp b/src/location/maps/qgeofiletilecache.cpp index 4efe9696..688fdf32 100644 --- a/src/location/maps/qgeofiletilecache.cpp +++ b/src/location/maps/qgeofiletilecache.cpp @@ -307,6 +307,9 @@ void QGeoFileTileCache::insert(const QGeoTileSpec &spec, const QString &format, QGeoTiledMappingManagerEngine::CacheAreas areas) { + if (bytes.isEmpty()) + return; + if (areas & QGeoTiledMappingManagerEngine::DiskCache) { QString filename = tileSpecToFilename(spec, format, directory_); QFile file(filename); |