On Mon, Jul 29, 2013 at 5:24 PM, Kuzma Shapran <[email protected]> wrote:
> on Ubuntu libdconf1 depends on libc6 and libglib2.0-0. that's all
>
> BTW while checking dependencies of dconf I came across a `libdconf-qt0`:
>   Description: dconf Qt bindings (library)
>     This plugin provides dconf support for Qt applications. The Qt library
> shouldn't be used directly as there is no ABI and API stability guarantee.
>   Homepage: https://gitorious.org/dconf-qt
>
> Can it be helpful?
>
> Regards,
> Kuzma

We have three options.
1. use dconf client API directly.
  https://developer.gnome.org/dconf/unstable/DConfClient.html
  pros: no additional dependency
  cons: low level (not a problem if we encapsulate it in a class)
2. use dconf-qt backend created by canonical
  pros: ready to use
  cons: not documented, API unstable, no widely available
3. use GSettings, which has a dconf backend
  pros: built-into glib, no additional dependency, well documented,
have associated tools to handle xml schemes
  cons: lower level than dconf-qt? glib dependency is not a problem
since dconf itself requires glib and we're already using it. C API is
not a problem either, if we encapsulate it in our own QSettings
replacement class.

The problem of QSettings is its uncertain future.
https://bugreports.qt-project.org/browse/QTBUG-20886
There seems to be discussions about removing QSettings from Qt5.
So, creating our own class mimicking the interface of QSettings might
be a good idea.
With our own settings class, we can create QSettings backend and dconf backend.
The users of the class do not need to know implementation details, so
the backends can be changed again once Qt 5 provides a new settings
class.
Then, all of our components uses this settings class to read/write settings.

The only problem of this approach is, dconf refer to the config with
URI-like paths, such as org.gnome.XXX, and QSettings ini files use
"group + key" to refer to a config value.

It's hard to make a common interface for both of them since they refer
to the config values by different ways.
Or, we can still use "group + key" for it, but translate it to
"org.lxde-qt.OurApp.group.key" for dconf internally in our settings
class.

Cheers!

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Lxde-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lxde-list

Reply via email to