summaryrefslogtreecommitdiffstats
path: root/src/xml
diff options
context:
space:
mode:
authorMorten Sørvig <morten.sorvig@qt.io>2022-09-12 13:25:18 +0200
committerMorten Sørvig <morten.sorvig@qt.io>2022-09-27 14:03:13 +0200
commit6b6aeef217aa309a6f13888ae7286d8b31e1c71e (patch)
tree762aaa22e19b51fb62e800656f9671ec8e23e4da /src/xml
parentb89d63515bb352cecfd87e709320a2db5b6a1906 (diff)
wasm: add Window.localStorage settings backend
Window.localStorage provides a synchronous API for storing saving data across browsing sessions, and is a good match for QSettings. Storage is limited to 5MB per origin, which should be sufficient for typical application settings. Window.localStorage is shared by all pages/apps on the origin (e.g. "https://qt.io" is one origin), which makes key collisions possible. To avoid this the key structure is "qt-v0-org-app-userkey", where both the organization and application name is used to differentiate between keys, and "v0" is a version tag to allow changing the key structure in the future. We reserve the "qt" prefix for keys written by QSettings. Add the new implementation as QWasmLocalStorageSettingsPrivate, rename the existing settings backend to QWasmIDBSettingsPrivate. Make QSettingsPrivate::create() support backend selection using the QSettings::Format enum. It now also supports selecting the Ini backend, which can be used to store larger amounts of settings, for example to a file on IDBFS. (alternatively IDBSettings + asyncify could also be used for this case) Change-Id: If70aa488635018218bc2a19803c4a719732c0004 Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io> Reviewed-by: David Skoland <david.skoland@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/xml')
0 files changed, 0 insertions, 0 deletions