summaryrefslogtreecommitdiffstats
path: root/cmake/QtModuleHelpers.cmake
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-12 19:50:02 +0200
commit1f6213713d8e51b8d236c6be41c92b36fe95e3c1 (patch)
treef463218a615de1317576a3fc68eed8806f5c31f5 /cmake/QtModuleHelpers.cmake
parentffa3c3579acaf3291b0cfa7e5670313d576d5d49 (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: David Skoland <david.skoland@qt.io>
Diffstat (limited to 'cmake/QtModuleHelpers.cmake')
0 files changed, 0 insertions, 0 deletions