[Development] Behaviour change in QML in Qt 5.8 regarding null

Allan Sandfeld Jensen kde at carewolf.com
Wed Sep 28 10:39:42 CEST 2016


On Wednesday 28 September 2016, Thiago Macieira wrote:
> On quarta-feira, 28 de setembro de 2016 01:22:33 PDT Allan Sandfeld Jensen
> 
> wrote:
> > > QVariant::fromValue(nullptr).isNull() == false
> > > QVariant(QMetaType::Nullptr).isNull() == true
> > 
> > And QVariant(nullptr) doesn't compile.
> > 
> > We should probably fix the fromValue constructor.
> 
> I don't think so. This is also false:
> 
> 	QVariant::fromValue<void *>(nullptr).isNull()

Is QVariant(QMetaType::VoidStar).isNull()  true?

Since nullptr is new, I would prefer if we could avoid having it too quirky to 
begin with.

`allan



More information about the Development mailing list