diff options
author | Lubomir I. Ivanov <neolit123@gmail.com> | 2017-08-12 18:14:32 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-08-24 13:11:39 -0700 |
commit | 12ea31ef78454d9cff45d0df52687739ee1f35de (patch) | |
tree | 0552d16c31d5a4f5e2ea65fdbe8b6479b61c1ec1 /mobile-widgets | |
parent | 1da4f91cc88000a4d4922b345264a3ef9752ed8a (diff) | |
download | subsurface-12ea31ef78454d9cff45d0df52687739ee1f35de.tar.gz |
mapwidgethelper: use system_default_directory() for cache
The default location which is used when the
PluginParemeter "googlemaps.cachefolder" is not specified
should be ~/.cache/googlemaps on Linux or
/user/<name>/appdata/local/cache/googlemaps on Windows.
This patch moves the cache to the default system location
where we store the printing templates, cloudstorage and the
default user XML file.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Diffstat (limited to 'mobile-widgets')
-rw-r--r-- | mobile-widgets/qmlmapwidgethelper.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mobile-widgets/qmlmapwidgethelper.cpp b/mobile-widgets/qmlmapwidgethelper.cpp index 569bd9f68..d0229f020 100644 --- a/mobile-widgets/qmlmapwidgethelper.cpp +++ b/mobile-widgets/qmlmapwidgethelper.cpp @@ -249,6 +249,7 @@ QString MapWidgetHelper::pluginObject() str += " id: mapPlugin;"; str += " name: 'googlemaps';"; str += " PluginParameter { name: 'googlemaps.maps.language'; value: '%lang%' }"; + str += " PluginParameter { name: 'googlemaps.cachefolder'; value: '%cacheFolder%' }"; str += " Component.onCompleted: {"; str += " if (availableServiceProviders.indexOf(name) === -1) {"; str += " console.warn('MapWidget.qml: cannot find a plugin named: ' + name);"; @@ -257,5 +258,7 @@ QString MapWidgetHelper::pluginObject() str += "}"; QString lang = uiLanguage(NULL).replace('_', '-'); str.replace("%lang%", lang); + QString cacheFolder = QString(system_default_directory()).append("/googlemaps"); + str.replace("%cacheFolder%", cacheFolder.replace("\\", "/")); return str; } |