Details
-
Bug
-
Resolution: Duplicate
-
P2: Important
-
None
-
5.0.0 Beta 1
-
None
Description
QJSValue represents a NULL value as QVariant(QMetaType::VoidStar, 0), which is at odds with the definition resulting from QV8Engine::toBasicVariant(), which returns QVariant();
The latter cannot be changed, because it would result in property lookups that return null pointers yielding true from IsValid(), which would be an API change.
Currently, the only place this discrepancy causes a problem is in the v4 autotest, where it causes V4 and V8 to produce different results when initializing a QJSValue property to 'null'. Perhaps it is not actually helpful to preserve type information in converting a void* via QJSValue, since this does not conform to the QV8Engine behavior?
Attachments
Issue Links
- is replaced by
-
QTBUG-40880 Null properties get converted to QVariant(void*) when put inside a QML model
-
- Closed
-