[Development] QSettings refactor updates

Bo Thorsen bo at vikingsoft.eu
Fri Oct 10 08:37:34 CEST 2014

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);
QConfigGroup window(config, "window");


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

More information about the Development mailing list