From 6e276607e507f36bd94c33652071cf0413c6ba3a Mon Sep 17 00:00:00 2001 From: Paolo Angelelli Date: Thu, 4 May 2017 20:40:58 +0200 Subject: Workaround for QGeoFileTileCache losing content This patch disables the queue persistence, that causes the cache to fail indexing valid content present in the cache on disk Task-number: QTBUG-60581 Change-Id: Iec3ba6105fe59a6f466bfabf0db4bf4fc00267af Reviewed-by: Alex Blasche --- src/location/maps/qgeofiletilecache.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/location/maps/qgeofiletilecache.cpp b/src/location/maps/qgeofiletilecache.cpp index a583e66a..d2d0070b 100644 --- a/src/location/maps/qgeofiletilecache.cpp +++ b/src/location/maps/qgeofiletilecache.cpp @@ -151,7 +151,7 @@ void QGeoFileTileCache::loadTiles() QDir dir(directory_); QStringList files = dir.entryList(formats, QDir::Files); - +#if 0 // workaround for QTBUG-60581 // Method: // 1. read each queue file then, if each file exists, deserialize the data into the appropriate // cache queue. @@ -189,7 +189,7 @@ void QGeoFileTileCache::loadTiles() diskCache_.deserializeQueue(i, specs, queue, costs); file.close(); } - +#endif // 2. remaining tiles that aren't registered in a queue get pushed into cache here // this is a backup, in case the queue manifest files get deleted or out of sync due to // the application not closing down properly @@ -204,6 +204,7 @@ void QGeoFileTileCache::loadTiles() QGeoFileTileCache::~QGeoFileTileCache() { +#if 0 // workaround for QTBUG-60581 // write disk cache queues to disk QDir dir(directory_); for (int i = 1; i<=4; i++) { @@ -226,6 +227,7 @@ QGeoFileTileCache::~QGeoFileTileCache() } file.close(); } +#endif } void QGeoFileTileCache::printStats() -- cgit v1.2.3