@ -54,7 +54,13 @@
# include <QtLocation/private/qgeotiledmapdata_p.h>
# include <QtLocation/private/qgeotiledmapdata_p.h>
# else
# else
# include <QtLocation/private/qgeotiledmap_p.h>
# include <QtLocation/private/qgeotiledmap_p.h>
# if QT_VERSION >= 0x050600
# include <QtLocation/private/qgeofiletilecache_p.h>
# else
# include <QtLocation/private/qgeotilecache_p.h>
# endif
# endif
# endif
# include <QDir>
# include <QDir>
# include <QStandardPaths>
# include <QStandardPaths>
@ -225,7 +231,12 @@ QGeoTiledMappingManagerEngineQGC::_setCache(const QVariantMap ¶meters)
if ( memLimit < 1024 * 1024 )
if ( memLimit < 1024 * 1024 )
memLimit = 1024 * 1024 ;
memLimit = 1024 * 1024 ;
//-- Disable Qt's disk cache (set memory cache otherwise Qtlocation won't work)
//-- Disable Qt's disk cache (set memory cache otherwise Qtlocation won't work)
# if QT_VERSION >= 0x050600
QAbstractGeoTileCache * pTileCache = new QGeoFileTileCache ( cacheDir ) ;
setTileCache ( pTileCache ) ;
# else
QGeoTileCache * pTileCache = createTileCacheWithDir ( cacheDir ) ;
QGeoTileCache * pTileCache = createTileCacheWithDir ( cacheDir ) ;
# endif
if ( pTileCache )
if ( pTileCache )
{
{
//-- We're basically telling it to use 100k of disk for cache. It doesn't like
//-- We're basically telling it to use 100k of disk for cache. It doesn't like