|
QtPass 2.0.0
Developer documentation
|
Maps AppSettings to and from a QSettings store. More...
#include <settingsserializer.h>
Static Public Member Functions | |
| static auto | load (QSettings &qs) -> AppSettings |
| Read all flat settings from a QSettings store. | |
| static auto | loadPasswordConfiguration (QSettings &qs) -> PasswordConfiguration |
| Read only the password generation settings from a QSettings store. | |
| static void | save (QSettings &qs, const AppSettings &settings) |
| Write all flat settings to a QSettings store. | |
Maps AppSettings to and from a QSettings store.
Pure, side-effect-free translation between the flat AppSettings value object and the on-disk QSettings keys (the same keys QtPassSettings uses). Unlike the legacy getters it performs no path normalisation, directory creation, screen-centring or .git auto-detection — it only reads and writes raw values. That makes it unit-testable against a throwaway QSettings without any singleton or widget setup.
Definition at line 27 of file settingsserializer.h.
|
static |
Read all flat settings from a QSettings store.
| qs | Source settings store. |
Definition at line 44 of file settingsserializer.cpp.
|
static |
Read only the password generation settings from a QSettings store.
The stored charset selection is validated against PasswordConfiguration::CharacterSet; an out-of-range value (hand-edited or corrupted ini) falls back to ALLCHARS so consumers can index PasswordConfiguration::Characters with it safely.
| qs | Source settings store. |
Definition at line 15 of file settingsserializer.cpp.
|
static |
Write all flat settings to a QSettings store.
| qs | Destination settings store. |
| settings | Values to persist. |
Definition at line 149 of file settingsserializer.cpp.