[Development] Settings API for QML

Thiago Macieira thiago.macieira at intel.com
Tue Dec 11 05:46:19 CET 2012

On segunda-feira, 10 de dezembro de 2012 19.51.32, Alan Alpert wrote:
> There was a discussion a while ago about a better settings API for
> QML, http://permalink.gmane.org/gmane.comp.lib.qt.qml/3162 was the
> best link I could find, but no progress has been made since. The main
> concensus I got from that thread was just that no one likes QSettings
> (ancient, file-based) and no one uses local storage (just not simple
> enough). For just simple, persistent settings there was a need for a
> new API. And there still is, since I don't think we agreed on an API
> or location for it.

Before we do settings for QML, we need to figure out what to replace QSettings 
with. Or, better yet, we do the two at the same time: we develop the new C++ 
and QML settings APIs at the same time.

Last time this discussion came about, we ended up concluding there's a lot of 
value in the Publish and Subscribe API, so I'd start there for prototyping.

> So I'd like to restart the discussion with the suggestion that a
> convenience persistent settings API be added to the
> QtQuick.LocalStorage module. Basically just a convenient wrapper using
> the exact same backend as the LocalStorage type (possibly even
> implemented with it in QML).

This might be able to save and store simple settings local to the application, 
but it will fall apart when the application needs to access settings shared 
with other applications or the system. We need a proper API to read system-
wide settings.

I'm not sure we should bundle that with Windows registry API, though, like 
QSettings is.

Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20121210/95293c2b/attachment.sig>

More information about the Development mailing list