aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlvaluetypewrapper.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Move prototype pointer into QV4::InternalClassLars Knoll2013-09-021-2/+2
| | | | | | | | | | | | | The prototype is actually the same for most objects. By moving it into the internal class, we can save 8 bytes per object, as well as allowing for some future optimizations. Also fix a bug in the implementation of the Error prototype objects. Change-Id: I4d4b641055f644a9b088f27be34bfdb0446279b7 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix hasOwnProperty on various types wrapped in QMLSimon Hausmann2013-08-081-0/+19
| | | | | | | | | | | | * Change semantics of Object::query to not walk the prototype chain but let the caller do that where needed (__hasProperty__) * Re-implement query in various places * Implement method_hasOwnProperty to fall back to query() if getOwnProperty failed * Fix missing prototype initialization in some qml wrappers, as well as missing base class calls to ::get() Change-Id: Ic2a702fd5ff3be2ff3c8317a8a24f99940a9594f Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Get rid of the first half of QQmlGuard usageLars Knoll2013-07-051-1/+1
| | | | | | | | | QQmlGuard was being used as a more performant replacement for QPointer. QPointer got now fixed in Qt 5.0, making this class obsolete. Change-Id: I77eef066c4823af4b074ef32d4d78dbd67c36cd0 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Get rid of QHashedV4StringLars Knoll2013-06-281-4/+2
| | | | | | | | This was required while we were using V8, but now we can simply pass QV4::String pointers. Change-Id: If6338e4a455d6132fe14e5e603e4fe9e477d1ffb Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove context parameter from Manged::put.Lars Knoll2013-06-221-4/+4
| | | | | Change-Id: Ib99e726ffbb20463d45a8444b4fbdfe32cd6dbef Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove context parameter from Managed::get()Lars Knoll2013-06-221-5/+6
| | | | | Change-Id: I61837e4b17d7475dcda2f31b8a293c0020930d52 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix qqmlvaluetypewrapper auto-testsSimon Hausmann2013-06-201-7/+5
| | | | | | | | | | QQmlValueTypeWrapper stores its prototype in a global variable (PersistentValue), which doesn't work when using multiple engines. Instead this patch introduces the QML extensions structure to hold things like prototypes for type extensions to JS that are specific to QML. Change-Id: I41a71029edb6ce895eb80db7aa0809aab86b31db Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Simplify QObjectWrapper calls from within other type wrappersSimon Hausmann2013-06-071-1/+1
| | | | | | | ... with the help of a getQmlProperty static function. Change-Id: Ia823ba9ac995cb1a0591081bf18418f48d60e04d Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Get rid of QV8QObjectWrapper::getPropertySimon Hausmann2013-06-071-2/+3
| | | | | | | Replace the call sites with calls to getQmlProperty on the QObjectWrapper. Change-Id: I3dbc3788c8d1631d817f65c738f0a8a31deb2866 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix regression with meta object revision checkingSimon Hausmann2013-06-031-1/+1
| | | | | | | | | | | | | Commit 00a07bcbd7a592072822b0e55ab2e75e90c3f9f5 replaced the CheckRevision parameter on the call GetProperty on the scope QObject with a get that would do IgnoreRevision. This adds a property getter on the QV4::QObjectWrapper that allows for checking the meta object revision. The plan is to move all of the property getter code from QV8QObjectWrapper into QV4::QObjectWrapper incrementally. Change-Id: I8e5a93ce3351a8c5dba13f14cd43e4036875b792 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Convert more subclasses of Managed to the new casting schemeLars Knoll2013-05-311-1/+0
| | | | | Change-Id: I4105f61d8b1d32b59281eb28fc31002a0ac4e4eb Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Move Variant and QtObject over to new casting schemeLars Knoll2013-05-311-1/+1
| | | | | Change-Id: Ie9e5e40b4bea4d4379dc9bdd103852c32d6ae478 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Start converting casting of Managed to subtypes to a better schemeLars Knoll2013-05-311-6/+6
| | | | | | | | | | | There is now a template based as<Foo>() method available in Managed, that'll allow casting to the proper subclass. It uses the pointer to the vtable and compares it to the classes static vtable for type checking. Like this we can avoid that Managed has to know about all subclasses. Change-Id: Ic966bbe00d85224b8d96cc0ff00f69a6ac67129e Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Get rid of v8::UserObjectComparisonCallbackLars Knoll2013-05-311-2/+15
| | | | | | | | Add a isEqualTo Method to the Managed's vtable, that will be used for comparing. Change-Id: I4d253db93851c16a57aa1412fa7142913d1744e6 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Port the list wrapper over to v4Lars Knoll2013-05-311-1/+0
| | | | | | | Also fix two places where we did a wrong type check. Change-Id: Ibc988b1b38803ca6acf6914487415026910f744e Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Smaller cleanupsLars Knoll2013-05-301-8/+0
| | | | | Change-Id: I7c3ec27b2910a98f667d13011192cbe57bb1d7c7 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix all autotests related to value typesLars Knoll2013-05-301-2/+4
| | | | | | | | Fix 3 bugs in the new implementation, and adjust two expected error messages in the auto test. Change-Id: Ic3c08e54f9babc7e4779d67829e36f3ff805e127 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Port the value type wrapper over to use V4Lars Knoll2013-05-301-0/+396
Change-Id: I0c566d0ab8cdd0ddbc688b7a1462c4b21084b30a Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>