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

QSettings stored at multiple locations #121

Open
slipher opened this issue Apr 29, 2024 · 1 comment
Open

QSettings stored at multiple locations #121

slipher opened this issue Apr 29, 2024 · 1 comment

Comments

@slipher
Copy link
Contributor

slipher commented Apr 29, 2024

We use the QSettings to store some settings for the updater. But there is also some Qt support code that makes its own QSettings in a different place to store settings for "QQControlsFileDialog". We should try to make all of them be in one place.

  • Windows: Our settings are in the registry at HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Unvanquished Development\Unvanquished Updater while QQControlsFileDialog is at HKEY_CURRENT_USER\SOFTWARE\Unvanquished Development\Unvanquished Updater.
  • Linux: Our settings are in the file ~/.config/unvanquished/updater.conf, while QQControlsFileDialog is in ~/.config/Unvanquished Development/Unvanquished Updater.conf.

A potential complication is that our main settings location on Windows requires admin permissions to write. But this would only become a problem if some component used in the splash screen were to need QSettings.

slipher added a commit to slipher/updater that referenced this issue Jul 13, 2024
Fixes the Linux part of Unvanquished#121. Choose the location of our settings by
changing the default location for settings, rather than customizing the
parameter of our settings object. This makes it so the settings added by
a component we depend on end up in the same place.
slipher added a commit to slipher/updater that referenced this issue Jul 14, 2024
Fixes the Linux part of Unvanquished#121. Choose the location of our settings by
changing the default location for settings, rather than customizing the
parameter of our settings object. This makes it so the settings added by
a component we depend on end up in the same place.
slipher added a commit to slipher/updater that referenced this issue Jul 16, 2024
Fixes the Linux part of Unvanquished#121. Choose the location of our settings by
changing the default location for settings, rather than customizing the
parameter of our settings object. This makes it so the settings added by
a component we depend on end up in the same place.

Some more explanation quoted from the Github thread:

>   I still don't understand the reasoning? Is it that the name
    "Unvanquished Development" is better on Windows?

>   With the organization name, actually Mac and Windows are the same
    and Linux will now be different. Previously, we chose the
    unvanquished/updater path to store the main settings of the updater.
    Some stuff was stored in an Unvanquished Development/Unvanquished
    Updater path by accident; I want to stop that. We need to go with
    the lowercase one to maintain compatibility with the previous
    version of the updater. But yes, the lowercase ones seem more in
    line with Linux stylistic conventions.
slipher added a commit that referenced this issue Jul 16, 2024
Fixes the Linux part of #121. Choose the location of our settings by
changing the default location for settings, rather than customizing the
parameter of our settings object. This makes it so the settings added by
a component we depend on end up in the same place.

Some more explanation quoted from the Github thread:

>   I still don't understand the reasoning? Is it that the name
    "Unvanquished Development" is better on Windows?

>   With the organization name, actually Mac and Windows are the same
    and Linux will now be different. Previously, we chose the
    unvanquished/updater path to store the main settings of the updater.
    Some stuff was stored in an Unvanquished Development/Unvanquished
    Updater path by accident; I want to stop that. We need to go with
    the lowercase one to maintain compatibility with the previous
    version of the updater. But yes, the lowercase ones seem more in
    line with Linux stylistic conventions.
@slipher
Copy link
Contributor Author

slipher commented Jul 16, 2024

#129 fixes the issue for Linux. It's still there on Windows and would be a lot harder to fix for Windows. Mac is probably not affected since it uses the default parameters when constructing QSettings (like Linux has been changed to do).

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

No branches or pull requests

1 participant