[Development] Behaviour change in QML in Qt 5.8 regarding null
Simon.Hausmann at qt.io
Wed Sep 28 17:42:06 CEST 2016
From: thiago.macieira at intel.com
Sent: September 28, 2016 17:37
To: development at qt-project.org
Subject: Re: [Development] Behaviour change in QML in Qt 5.8 regarding null
On quarta-feira, 28 de setembro de 2016 08:54:10 PDT Simon Hausmann wrote:
> to a QVariant, it used to use
> QVariant(QMetaType::VoidStar, (void *)0);
> and now uses
Neither is isNull() == true.
> If a string is to be converted to a QVariant, it will naturally use
> QVariant(thatString). I think if that
> string happens to be a null QString, then QVariant isNull() will return
> true, right?
Right. he question was whether QML strings were guaranteed to be non-null. If
you can't guarantee that, then we can't rely on QVariant::isNull().
> If that is unsufficient for the pim code here (or generally any other code),
> then my recommendation
> would be to change the signature to take a QJSValue instead of a QVariant.
> The engine supports that
> transparently and the QJSValue API allows distinguishing between a
Are we deprecating the QVariant interface?
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
Development mailing list
Development at qt-project.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Development