Skip to content
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

Add option to store settings in APEX folder #264

Open
tomfrancart opened this issue Dec 28, 2018 · 2 comments
Open

Add option to store settings in APEX folder #264

tomfrancart opened this issue Dec 28, 2018 · 2 comments
Assignees

Comments

@tomfrancart
Copy link
Contributor

Currently, APEX settings such as calibration, or SPIN configurations are stored using QSettings. On Linux they go to a user-specific config-file and on windows they go to the registry.
We'd like an option to store the settings in a file in the APEX installation folder instead (so they become system-wide instead of user-specific, and also specific to that particular APEX version on the system).
Please add an option to apexconfig.xml to en/disable this behaviour.

The current use-case is to share profiles of the SPIN runner across users, the relevant code for that is in src/lib/apexspin/spinusersettingsdatabase.cpp
Apart from that "git grep QSettings" might be helpful

See also http://doc.qt.io/qt-5/qsettings.html#Format-enum

@linusdm
Copy link

linusdm commented Jan 4, 2019

QSettings is flexible in the way it looks for a value and has built-in support for differentiating between user and system-wide settings (http://doc.qt.io/qt-5/qsettings.html#Scope-enum). Would it suffice to make the scope for the settings configurable (system-wide vs per-user)? This is an easy change.
If the requirement is to have per-user versus per-application-installation settings, this requires more work, and will require that we save the settings in a file on windows installations, instead of in the registry.

@tomfrancart
Copy link
Contributor Author

Not really: the problem is that for system wide settings, apex would need to run as administrator, and it quickly becomes a mess when you both have user specific and system wide settings. We already have this feature for calibration (cf the calibrationadmin tool, which allows to make a calibration setup system-wide).
I therefore suggest to add a option to make settings apex-installation-specific (the user will then need write permission to the apex installation folder, perhaps keep in mind that we might add an option later on to set the settings path in apexconfig.xml). This will involve setting QSettings such that settings are saved to file, probably comes down to one call to a method of QSettings and some magic to get the paths right ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants