Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use JSON for configuration to avoid QSettings bugs #21

Closed
special opened this issue Mar 28, 2014 · 0 comments
Closed

Use JSON for configuration to avoid QSettings bugs #21

special opened this issue Mar 28, 2014 · 0 comments
Labels
Milestone

Comments

@special
Copy link
Member

special commented Mar 28, 2014

Settings are currently written in INI form via QSettings. This includes important, potentially irreplaceable information like the contacts list.

QSettings is a known-buggy mess of technical debt. Most notably, it truncates before writing and on a variety of read errors, meaning all settings can easily be lost (https://bugreports.qt-project.org/browse/QTBUG-21739).

JSON + QSaveFile is a much safer solution that is still easily readable and hand-modifiable.

@special special added this to the 1.0.x milestone Mar 29, 2014
special added a commit to special/ricochet that referenced this issue Jul 16, 2014
QSettings has been used to store configuration, including critical data
like the contacts list. But it is flawed: lack of atomic writes can result
in data loss, the ini format is limited and crappy, the API is awful,
and there is no easy way to support QML or bindings.

This system addresses these concerns with a new JSON-based settings API.
It can be exposed to QML, supports change notification, always uses
atomic writes, and improves the read/write APIs.

Fixes ricochet-im#21
special added a commit to special/ricochet that referenced this issue Jul 16, 2014
QSettings has been used to store configuration, including critical data
like the contacts list. But it is flawed: lack of atomic writes can result
in data loss, the ini format is limited and crappy, the API is awful,
and there is no easy way to support QML or bindings.

This system addresses these concerns with a new JSON-based settings API.
It can be exposed to QML, supports change notification, always uses
atomic writes, and improves the read/write APIs.

Fixes ricochet-im#21
wfr pushed a commit to wfr/ricochet-irc that referenced this issue Nov 22, 2020
Merging into v3-2020-alpha to consolidate future development in the main repo. Changes have been made to the build process, hence the Travis CI build error. This will be fixed once further updates are completed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant