Philipp Kursawe schreef op 18-11-2013 13:25:
On Mon, Nov 18, 2013 at 12:45 PM, André Somers <an...@familiesomers.nl
<mailto:an...@familiesomers.nl>> wrote:
I often see with OO programmers that they very quickly turn to
subclassing to use a class they find useful. Somehow, encapsulation
doesn't seem to get the same amount of attention as inheritance does.
Inheritance is not the tool to use here, I think.
I am are of encapsulation, but it forces a new API on the programmers
of the plugins. When they are used to QSettings why introduce a new
interface?
Because IMnsHO the API of QSettings is useful to talk to a settings
backend, but not so useful as an API for an application to talk about
its specific settings. Do you really want to use strings as keys and
cast to and from QVariants throughout your code? I don't. Just like many
other posters, I much prefer an API where the settings are explicitly
coded and type safe. That is: there are explicit getters, setters and
where needed, signals for each of them.
André
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest