Remove invalid QJSValue type
authorKent Hansen <kent.hansen@nokia.com>
Wed, 18 Jan 2012 08:37:30 +0000 (09:37 +0100)
committerQt by Nokia <qt-info@nokia.com>
Thu, 2 Feb 2012 07:10:18 +0000 (08:10 +0100)
commited84a6ee63ac7a53f37efad3eb4a7e4eaa047242
tree30fccf1b66a465a73594e74f4bda54f07e9cce5d
parent4587be8097d23efe51ff46100bafad59640c10d8
Remove invalid QJSValue type

Rationale: It's confusing to have an invalid type (which doesn't
exist in JavaScript), and it creates lots of extra cases that have
to be handled e.g. in value conversion and comparison. The Undefined
type should be sufficient.

Also, the invalid value type was being (ab)used to 1) make
setProperty() act as a property deleter, and 2) signify that a
property queried by property() doesn't exist. The recently introduced
functions has(Own)Property() and deleteProperty() now provide that
functionality.

Default-constructed QJSValues now have the Undefined type.

Task-number: QTBUG-23604
Change-Id: I1847492724d31e03ee1212c09ec87a2010920dc5
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
src/declarative/qml/v8/qjsvalue.cpp
src/declarative/qml/v8/qjsvalue.h
src/declarative/qml/v8/qjsvalue_impl_p.h
src/declarative/qml/v8/qjsvalue_p.h
src/declarative/qml/v8/qjsvalueiterator_impl_p.h
src/declarative/qml/v8/qv8engine.cpp
src/declarative/qml/v8/qv8typewrapper.cpp
tests/auto/declarative/qjsengine/tst_qjsengine.cpp
tests/auto/declarative/qjsvalue/tst_qjsvalue.cpp
tests/auto/declarative/qjsvalueiterator/tst_qjsvalueiterator.cpp