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
QSettings should use INI files on Windows(TM) instead of the Windows Registry #670
Comments
Or you could have a registry point to the last .ini file, then a new version without a local .ini file could look for the last one as the basis for it's own new one. That way new/snapshot stuff won't affect settings for previous versions too. |
In terms of color schemes, this has been moved to separate .json files - see #1008. |
It's possible to use QSettings::IniFormat to force QSettings to store the preferences in .ini files: |
if this issue is still open, there is the option to add some lines of code to the updater (if there is any) and read all the registry entries, clear them and write them into the said ini file |
Added missed translated strings
I think ideally we should have a non-Qt dependent alternative to reading settings(for all platforms, not just Windows) so that headless build can read settings without linking to Qt. I know most of the settings are GUI specific, but there are a couple like cache size that shouldn't be tied to GUI. |
Ideally a mechanism to allow versioning of preferences. |
An alternative way of saving might be a nice option. It's probably not very easy to move everything out as there are a couple of cases where Qt stores some kind of internal data representation (QGamepad, Window positions, ...?) so we have to find a way to tunnel that though to a different backend. |
windows has changed so much this is irrelevant now |
If we move QSettings from the Windows Registry into a simple .ini file inside the OpenSCAD per-user directory, this would make it very simple for the windows folks to customize settings if they wanted to. It would be a text file, much like the .config/OpenSCAD.conf situation that we have on Linux.
The immediate benefit here is for the easy user-customization of colors for the 3d window and for syntax highlighting. It is not as "good" as a fancy GUI interface for color-picking, but it is a good start towards that and is relatively simple to implement. It is an important part of UI to allow users to customize certain things for their environment and situation, such as Colorblind users who may have different perceptions of red/green and whatnot.
The problem wil be migrating Registry entries to the .ini file so that people settings wont change after upgrade of OpenSCAD.
This is a bit tricky but its not rocket science. We can set a rule to prefer .ini file to registry.
Then on startup if the .ini file is missing (as it will be for all upgrades) we can load the registry entries, then immediately save them to a .ini file. (We have to verify that the .ini file wrote properly, of course, by loading it and doing a quick sanity check).
On subsequent runs the per-user .ini file will have all the settings saved.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: