[Development] QJsonValue (was: Re: Qt 5.2 header diff: QtCore)
marc.mutz at kdab.com
Tue Nov 5 18:10:30 CET 2013
On Tuesday, November 05, 2013 17:42:38 Thiago Macieira wrote:
> I think that was intentional since JSON is still using ECMAScript data
> types, whose Number type is a double precision floating point. Inserting
> any integer larger than 2^52 will result in loss of precision. So this
> forces people to use the toDouble() method to get the value back.
> > And isn't the new ctor going to be ambiguous?
> Not more than it is. Unless you're seeing something I'm not. Can you
> expand further?
Any integer type would previously pick the (int) ctor. Now, everything except
int and qint64 will be ambiguous, in particular unsigned int.
Hmm, or maybe the (bool) overload already made everything other than int and
More information about the Development