[Development] QSettings refactor updates

Tomaz Canabrava tcanabrava at kde.org
Sat Oct 11 02:21:41 CEST 2014


Hey,


On Fri, Oct 10, 2014 at 3:37 AM, Bo Thorsen <bo at vikingsoft.eu> wrote:

> Hi Tomaz,
>
> Den 10-10-2014 kl. 00:43 skrev Tomaz Canabrava:
> >      QConfig config;
> >      QConfigGroup& root = config.root();
> >      QConfigGroup& window = root.group("window");
>
> This looks a bit more complicated from the user point of view than it
> needs to be. But this might be because I don't know what the QConfig
> class does. If it's pretty much only a wrapper that holds the root and
> the file name, I would prefer that it's not exposed to the user.
>
> First possible way:
>
> QConfig config(optional filename);
>

Already works with filenames. :)


> config.setValue(...
> QConfigGroup window(config, "window");
>

Just changed to value semantics, got that out of the box. :)


> or
>
> QConfigGroup config(optional filename, optional QConfig)
>
> Thiago asked you not to use references. A design where you have an
> internally shared object that is the top config could work around this.
>
> But, as I said above, I'm not sure what your plans are for your QConfig
> class, and what the responsibilities of it are.
>
> Bo Thorsen,
> Director, Viking Software.
>
> --
> Viking Software
> Qt and C++ developers for hire
> http://www.vikingsoft.eu
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20141010/25d364c6/attachment.html>


More information about the Development mailing list