Get rid of QDeclarativeMetaType::{canCopy,copy}
authorKent Hansen <kent.hansen@nokia.com>
Wed, 12 Oct 2011 12:27:57 +0000 (14:27 +0200)
committerQt by Nokia <qt-info@nokia.com>
Fri, 9 Dec 2011 12:08:36 +0000 (13:08 +0100)
commitf6416183d36a260f3cbf6f89753f8a0ee27df7cc
treec0a8e60bfe2cf7dccba11f9518c7bac031b3796b
parent3cfee36b9910dafebd0846dd58115bf2f069ccba
Get rid of QDeclarativeMetaType::{canCopy,copy}

Now that we have QMetaType::construct() that does placement new
construction, we can use that to copy the value.

We need to destruct the (default-constructed) existing value first,
but for primitive types that's a no-op, and for Qt's types it's
cheap since they use lazy initialization or "shared null".

Change-Id: Idadee04b1d5b590be7fec50fb0396fd277bee973
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
src/declarative/qml/qdeclarativeboundsignal.cpp
src/declarative/qml/qdeclarativemetatype.cpp
src/declarative/qml/qdeclarativemetatype_p.h
tests/auto/declarative/qdeclarativeecmascript/data/signalWithQJSValue.qml [new file with mode: 0644]
tests/auto/declarative/qdeclarativeecmascript/testtypes.h
tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
tests/auto/declarative/qdeclarativemetatype/tst_qdeclarativemetatype.cpp