• 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>
    d96d89c6
Name
Last commit
Last update
..
notes.txt Loading commit data...
qjsconverter_impl_p.h Loading commit data...
qjsconverter_p.h Loading commit data...
qjsengine.cpp Loading commit data...
qjsengine.h Loading commit data...
qjsengine_p.h Loading commit data...
qjsvalue.cpp Loading commit data...
qjsvalue.h Loading commit data...
qjsvalue_impl_p.h Loading commit data...
qjsvalue_p.h Loading commit data...
qjsvalueiterator.cpp Loading commit data...
qjsvalueiterator.h Loading commit data...
qjsvalueiterator_impl_p.h Loading commit data...
qjsvalueiterator_p.h Loading commit data...
qqmlbuiltinfunctions.cpp Loading commit data...
qqmlbuiltinfunctions_p.h Loading commit data...
qscript_impl_p.h Loading commit data...
qscriptisolate_p.h Loading commit data...
qscriptoriginalglobalobject_p.h Loading commit data...
qscriptshareddata_p.h Loading commit data...
qscripttools_p.h Loading commit data...
qv8_p.h Loading commit data...
qv8bindings.cpp Loading commit data...
qv8bindings_p.h Loading commit data...
qv8contextwrapper.cpp Loading commit data...
qv8contextwrapper_p.h Loading commit data...
qv8debug_p.h Loading commit data...
qv8domerrors.cpp Loading commit data...
qv8domerrors_p.h Loading commit data...
qv8engine.cpp Loading commit data...
qv8engine_impl_p.h Loading commit data...
qv8engine_p.h Loading commit data...
qv8include.cpp Loading commit data...
qv8include_p.h Loading commit data...
qv8listwrapper.cpp Loading commit data...
qv8listwrapper_p.h Loading commit data...
qv8profiler_p.h Loading commit data...
qv8qobjectwrapper.cpp Loading commit data...
qv8qobjectwrapper_p.h Loading commit data...
qv8sequencewrapper.cpp Loading commit data...
qv8sequencewrapper_p.h Loading commit data...
qv8sequencewrapper_p_p.h Loading commit data...
qv8sqlerrors.cpp Loading commit data...
qv8sqlerrors_p.h Loading commit data...
qv8stringwrapper.cpp Loading commit data...
qv8stringwrapper_p.h Loading commit data...
qv8typewrapper.cpp Loading commit data...
qv8typewrapper_p.h Loading commit data...
qv8valuetypewrapper.cpp Loading commit data...
qv8valuetypewrapper_p.h Loading commit data...
qv8variantresource_p.h Loading commit data...
qv8variantwrapper.cpp Loading commit data...
qv8variantwrapper_p.h Loading commit data...
qv8worker.cpp Loading commit data...
qv8worker_p.h Loading commit data...
script.pri Loading commit data...
v8.pri Loading commit data...