|This page contains rough working notes from discussion sessions at Platform 11, the contents of which may not accurately reflect any decisions made. Please do not infer anything from these notes, official summaries of the conclusions reached will be made available for discussion as soon as possible.|
Replace KConfig with a Qt-only-based config library, with native backends for target operating systems. This new library will even be suitable for Qt-only apps. It will be the equivalent of Solid or Phonon for configuration.
Helio wants to try to implement it.
DConf as a backend for KConfig would offer some nice features.
Unlike the current .ini files it creates one or multiple binary settings files that is used by all applications. A shell tool exists as well as a gtk settings editor. This multiple files can be used in a form of list, with the benefits of locks as well, making a must for kiosk or at least not breaking the functionality.
Reading of settings is done via one mmaped file (read only). Therefor reading is fast. Writing happens via dbus.
There are notifications for changes of settings.
It features a hierarchy of settings like KConfig where user settings take precedence compared to system settings. The concept of locking is very similar to Kiosk immutable settings. In addition there are notifications if the locked state changes - that means activating a Kiosk immutable on a setting could immediately reflected in the UI.
There is an existing Qt library: https://gitorious.org/dconf-qt/dconf-qt
Problems could be: There is no win/mac support. This requires keeping the old way with ini files a live or some investment to make dconf work or write other kconfig backends.
We can't use change notifications as that would assume use of dconf as a backend which makes an application unportable to windows/mac (currently).
DConf stores its config in xdg dirs (.config).
Core dconf It requires quite new version of glib and vala, the visual registry editor requires Gtk 3 ( not needed for us now ) and dconf-qt made by Canonical requires a new vendor patch for Qt, included only in Qt 4.8
Registry? It has change notification support. Probably doesn't have all the types we would want - some encoding may need to be done.
Some sort of tool to convert existing ini configs would presumably be needed.
Mac OS X uses property lists as a configuration format. These are quite Objective-C centric. The OS X Objective C API has an NSUserDefaults class for accessing these, and provides basic change notification support.
The fact that this API is Objective C may prove problematic.
There is also the Core Foundation API. This is a C API, but has no notification support (that I can find).
It may make sense to split between application state and actual configuration settings. DConf and other backends could then handle the real settings whereas application state (unread mails in kmail) could be handled by the traditional ini files.