Browse Source

Merge pull request #167 from barthess/fix_cache_path

mapscache moved to user`s home directory to prevent polution of root FS
QGC4.4
Lorenz Meier 13 years ago
parent
commit
2c3a448f8a
  1. 8
      libs/opmapcontrol/src/core/cache.cpp

8
libs/opmapcontrol/src/core/cache.cpp

@ -41,9 +41,9 @@ namespace core {
void Cache::setCacheLocation(const QString& value) void Cache::setCacheLocation(const QString& value)
{ {
cache=value; cache=value;
routeCache = cache + "RouteCache" + QDir::separator(); routeCache = cache + "RouteCache/";
geoCache = cache + "GeocoderCache"+ QDir::separator(); geoCache = cache + "GeocoderCache/";
placemarkCache = cache + "PlacemarkCache" + QDir::separator(); placemarkCache = cache + "PlacemarkCache/";
ImageCache.setGtileCache(value); ImageCache.setGtileCache(value);
} }
QString Cache::CacheLocation() QString Cache::CacheLocation()
@ -54,7 +54,7 @@ namespace core {
{ {
if(cache.isNull()|cache.isEmpty()) if(cache.isNull()|cache.isEmpty())
{ {
cache= Utils::PathUtils().GetStoragePath()+"mapscache"+QDir::separator(); cache = QDir::homePath() + "/mapscache/";
setCacheLocation(cache); setCacheLocation(cache);
} }
} }

Loading…
Cancel
Save