mandag den 29. juli 2013 skrev PCMan :
To see how dconf works and make our evalation easier, I created a
simple class providing the same interface as QSettings, but uses dconf

It's a reusable C++ class - LxQt::Settings, a drop in replacement for
QSettings based on dconf.

It's a proof of concept. I only implement a subset of QSettings methods.
Besides, I haven't implement change notifications, either. (QSettings
IIRC does not support this)
Data stored are all strings, just like what QSettings stores in ini files.
However, dconf actually supports more data formats than string.
So, there are still rooms to improve this rough implementation.

I did not use glib GSettings since we do not need the features it
provides. So I call low level dconf client API instead.

main.cpp domonstrated how to use the class.
It's just like QSettings.

Comments are wanted.

Looks good to me. 

I was pondering a different approach: Looking at the source code for QSettings one can see that QSettings keeps an instance of the abstract class QPrivateSettings that handles communication with the backend. By choosing a concrete subclass such as QConfFileSettings or QWinSettings QSettings can chose the backend (ini-files or windows-registry).
So I thought that if we could make a subclass of QPrivateSettings for dconf and inject it into a QSettings instance, we'd be good to go. 
However this has the problem of relying on QPrivateSettings, which is marked as not intended for external use. So your approach is best I think.

lxqt-settings will probably need to emit a signal when settings change. RazorSettings, which work on top of QSettings, sets up filewatchers to be able to emit signals on change, and this won't work anymore.

br. Chr.


You received this message because you are subscribed to the Google
Groups "Razor-qt" group.
For more options, visit this group at

You received this message because you are subscribed to the Google Groups "Razor-qt" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
For more options, visit