[Development] QSettings refactor updates
thiago.macieira at intel.com
Mon Oct 20 14:11:20 CEST 2014
On Monday 20 October 2014 08:36:17 Simon Hausmann wrote:
> On Monday 20. October 2014 07.06.00 Thiago Macieira wrote:
> > On Sunday 19 October 2014 22:39:42 Branislav Katreniak wrote:
> > > > Cache format: binary json
> > >
> > > You use json internally as cache. What is the motivation to introduce
> > > new classes with similar API like QJson classes?
> > It's an implementation detail because the binary json loading and parsing
> > is extremely fast.
> What about the data type support?
Should be completely transparent and orthogonal. The data types supported by
the front-end should not be affected by whatever it uses for caching.
> The current .ini format Qt defines allows for custom types to be stored (in
> a hackish way and hard to version). Would the new API be limited to
> booleans, integers, doubles and strings? (i.e. no QVariant in the API)
I'd say it's a good idea to do that, though I'm pretty sure we'll get asked
for lists too. Then again, for lists I'd save multiple config entries instead
of one entry containing multiple items.
Dictionaries would be a little more difficult.
> What about nested types, i.e. storing something like QJsonObject? How would
> that be represented in .ini?
Convert to JSON and save as string.
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Development