• Kent Hansen's avatar
    Make QVariant conversion for JS null type symmetric · d96d89c6
    Kent Hansen authored
    If you pass (void*)0 to QJSEngine::toScriptValue(), or you pass a
    QVariant of type QMetaType::VoidStar containing a 0 value, you get
    back a QJSValue of type null (isNull() returns true); that's fine.
    However, if you called QJSValue::toVariant() on a JS null value, you
    would get back an invalid QVariant. The expected result is a
    QVariant of type QMetaType::VoidStar containing a 0 value. This
    makes the conversion of the JS null type symmetric and avoids loss
    of data.
    Change-Id: Ifa6e788152118f80adf9c2d7be1283f053b44294
    Reviewed-by: default avatarJędrzej Nowacki <jedrzej.nowacki@nokia.com>
    Reviewed-by: default avatarSimon Hausmann <simon.hausmann@nokia.com>
Last commit
Last update
animations Loading commit data...
debugger Loading commit data...
qml Loading commit data...
util Loading commit data...
qml.pro Loading commit data...
qtqmlglobal.h Loading commit data...
qtqmlglobal_p.h Loading commit data...