Config file changed from albert subdirectory to .config
Description
The configuration file seems to have changed from ~/.config/albert/albert.conf to ~/.config/albert.conf. I am not sure exactly when this broke, since I was unable to start albert on wayland until today due to some Qt 6.5.0 beta issues. However, I have also confirmed that this happens outside of the testing repositories, on Qt 6.4.2. There are also a few reports on the AUR of the same behavior. This is most likely a Qt change, but I didn't manage to track down the cause.
Expected behavior
- Albert should use
~/.config/albert/albert.confas it did before
Steps to reproduce
- Start albert
- Notice that it reverted to default settings
- Notice that it creates a
~/.config/albert.conf, but still uses~/.config/albert/albert.dbfor example - Add a
qDebug() << "Settings: " << settings.fileName();, and notice it prints11:34:11 [debg:default] Settings: "/home/username/.config/albert.conf"
Source
- Built from master (1f0af26)
Debug output
Albert version: 0.20.3
Build date: Jan 29 2023 11:28:13
Qt version: 6.4.2
Build ABI: x86_64-little_endian-lp64
Arch (build/current): x86_64/x86_64
Kernel (type/version): linux/6.1.8-arch1-1
OS: Arch Linux
OS (type/version): arch/unknown
$QT_QPA_PLATFORMTHEME:
Platform name: xcb
Binary location: /usr/bin/albert
$PWD: /home/jose
$SHELL: /bin/zsh
$LANG: en_US.UTF-8
Language: English
Locale: en_US
$XDG_SESSION_TYPE: x11
$XDG_CURRENT_DESKTOP:
$DESKTOP_SESSION:
$XDG_SESSION_DESKTOP:
Icon theme: hicolor
https://github.com/albertlauncher/albert/blob/v0.17.4/src/app/main.cpp#L142
I guess the problem is that i removed this line without knowing of the side effects.
reference https://doc.qt.io/qt-6/qsettings.html#setPath
Which versions are affected? When updating from 0.17.6 to 0.20.14 or 0.21.1, it cannot find its configuration anymore and creates ~/.config/albert.conf.
Creating a symlink './albert.conf' -> 'albert/albert.conf' does not solve the issue and still starts "for the first time".
I added a unified file in the config dir (does also affect all other platforms which usually dont use ini files).
I tried to port the config here.
Is somebody interested in testing the devel branch?