-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move the config-yaml to general plugin folder to avoid deletion when plugin is updated. #185
Conversation
What happens if we have an update for the config file, new parameters etc., and there is still an old one in the permanent location? |
Currently there will probably be a permission denied error. One way to solve this could be adding the plugin version to the config file and checking for it, overwriting the old config file when theres a new version. |
… config file is old When creating the config file used by the plugin, the plugin version is appended. This version is checked and if there's a new one, the old providers will be copied to the config file used by the plugin.
Wouldn't that be the opposite of what this issue targets to achieve? |
The way the current code in this PR handles it is every time the plugin is reloaded or QGis is started, in the init, there's a check that compares the plugin version with the version of the config file. If there's a difference, the old providers will be copied. Maybe this is too much trouble for this issue? |
Right now, we only keep the providers. Imo, that is fine how it is now. Maybe it's worth keeping an additional logic in case we modify the provider selection somehow. Old config structures shouldn't break new configs. If we're not going to change the provider logic, we could also just merge how it is now. @merydian What do you think? |
The problem i still see is potential issues with the config-yaml being in the plugin folder. I am not certain on how we can make sure there's nothing wrong with that. |
@koebi or @TheGreatRefrigerator what do you think? |
Maybe we should look into moving our settings to the QGIS plugin settings: We could just JSON.dumps the config object. |
Maybe this blog post is of relevance here? |
As @TheGreatRefrigerator suggested this now lives here wit QgsSettings: #249 |
No description provided.