KDE Core/Platform 11/Settings: Difference between revisions
OpenIDUser14 (talk | contribs) m (→General) |
Randomguy3 (talk | contribs) (→KConfig x New config as a library support: Improve English, and ask for clarifications) |
||
Line 3: | Line 3: | ||
= KConfig x New config as a library support = | = KConfig x New config as a library support = | ||
Replace KConfig with a Qt only based config library, with native backends for target | 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. | ||
It will be | |||
Desired characteristics: | |||
* Remove all global config usage ( as <KDEDIR>/share/config in Linux ). All configs are user based and Kiosk is of course respected, so no user or distro will be | * Remove all global config usage (as <KDEDIR>/share/config in Linux). All configs are user based and Kiosk is of course respected, so no user or distro will be affected. ''(Not sure what this means - is it simply saying that there will no longer be any configuration files installed by vanilla KDE? cf. next bullet point - rg3).'' | ||
* kcfg and defaults not deployed anymore | * kcfg and defaults would not be deployed anymore as separate files. Defaults should be included in binaries, through headers for example, and are generated on the fly on first run from user. Distros can still have their tree with configs. There should possibly be a tool to generate a description of what configuration files/options are available, for the use of distros and system admins. ''(Does this mean that the configuration system will still look in /etc/whatever, for example, so distros/sysadmins can change the global defaults? - rg3)'' | ||
* | * The new library would be written from scratch, and a KConfig compatibility layer would be provided to retain source compatibility. In future, apps should directly use the new library. The KConfig wrapper will be a transitory stage. | ||
Helio wants to try to implement it. | Helio wants to try to implement it. |
Revision as of 20:54, 12 February 2012
KConfig x New config as a library support
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.
Desired characteristics:
- Remove all global config usage (as <KDEDIR>/share/config in Linux). All configs are user based and Kiosk is of course respected, so no user or distro will be affected. (Not sure what this means - is it simply saying that there will no longer be any configuration files installed by vanilla KDE? cf. next bullet point - rg3).
- kcfg and defaults would not be deployed anymore as separate files. Defaults should be included in binaries, through headers for example, and are generated on the fly on first run from user. Distros can still have their tree with configs. There should possibly be a tool to generate a description of what configuration files/options are available, for the use of distros and system admins. (Does this mean that the configuration system will still look in /etc/whatever, for example, so distros/sysadmins can change the global defaults? - rg3)
- The new library would be written from scratch, and a KConfig compatibility layer would be provided to retain source compatibility. In future, apps should directly use the new library. The KConfig wrapper will be a transitory stage.
Helio wants to try to implement it.
Current pointed implementation issues open questions
- Multiple instances of same app and concurrent write/read
- Desire of config change notification related to backends, not all can have this available. Since we're not look deep on other platforms config systems, we assume that dconf is the only one that has it.
- Migration from kde4 configs. Proposal of a tool to make the process. This is feasible, only will relies on create a parser or use kconfig to read ini files, and will take some time to write. Using kconfig itself will create an undesirable dependency.
Configuration systems
DConf
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
See also: http://live.gnome.org/dconf/SystemAdministrators
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).
Current state to compile
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
Windows Native
TBD
OSX Native
TBD
QDesktopServices
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.
General
- Having a dconf backend to KConfig is nice but doesn't mean a huge change. For application developers nothing would change due to this. The implementation of a current KConfig backend is far from simple, and banging on current implementation add more code will not help in any thew goals of a new modern configuration system.
- What about QSettings? big problems with settings-groups, not power full enough for KDE. Can KConfig be merged with this ? The short answer is no, most the fact that even Trolls decided not support it anymore, and current KConfig architecture is way to different and for sure we don't want create an Unmaintainable Frankenstein.