mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	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>
This commit is contained in:
		
							parent
							
								
									1da4f91cc8
								
							
						
					
					
						commit
						12ea31ef78
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		|  | @ -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; | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue