So I am using QSettings
to store my preferences, and according to https://doc.qt.io/qt-5/qsettings.html#platform-specific-notes there is several locations where this is actually stored.
I am on macOS 10.14, yet I find the settings in $HOME/Library/Preferences/org.mycomp.myapp.plist
(the above link states this should be for macOS 10.2/10.3).
Now I can see by opening that this file contains my most recent settings changes, however, after deleting, my app still loads the settings. So there must be a second location where it is stored? But I can't seem to find it.
And for the unix variants:
So where is the settings still saved?!
In my main.cpp
I have:
QCoreApplication::setOrganizationName("Firstname Lastname");
QCoreApplication::setOrganizationDomain("mycomp.org");
QCoreApplication::setApplicationName("MyApp");
And I am using QSettings
with the default constructor. I am using Qt 5.13.2.
Since macOS Mavericks (10.9) preferences are cached to improve performance, so they say. When you delete the .plist file, they are still in memory each time you execute your program. You need to clear the preferences cache with this command:
killall -u $USER cfprefsd
Or you can reboot your computer...
If you (and your users) are tired of this, you may consider to use INI files with QSettings instead of the native OS format:
QSettings("MyApp.ini", QSettings::IniFormat)