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

Thiago Macieira thiago.macieira at intel.com
Tue Sep 27 23:59:50 CEST 2016


On terça-feira, 27 de setembro de 2016 18:22:34 PDT Simon Hausmann wrote:
> I'm fairly sure we used QVariant(QMetaType::VoidStar);

Can you guarantee that the only time the QML engine generates null QVariants 
is for null JS Values? That is, no null QStrings, null QVariantLists, null 
QVariantMaps/Hahes, null doubles, etc.?

If that's the case, I'd recommend a doc update and unit tests. Chris can fix 
his code for isNull().

Note:
	QVariant::fromValue(nullptr).isNull() == false
	QVariant(QMetaType::Nullptr).isNull() == true

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Development mailing list