aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/v8/qv8valuetypewrapper.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Port the value type wrapper over to use V4Lars Knoll2013-05-301-447/+0
| | | | | Change-Id: I0c566d0ab8cdd0ddbc688b7a1462c4b21084b30a Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix file and line number reporting of QML/JS errorsSimon Hausmann2013-05-271-1/+1
| | | | | | | | | | | * Replace QUrl with QString in V4 for the source location (we don't need URL parsing) * Replace line number and file in QV4::Exception with the information we retrieve from the stack trace of the exception. Fixes about five tst_qqmlecmascript tests that relied on correct file/line number information Change-Id: I2a3daa72be6c5587fd965211ea8f6fb77142e7ee Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Get rid of Get/SetHiddenValue in the v8 APILars Knoll2013-05-241-2/+3
| | | | | | | | | | It was only used to mark an object as something to be used as a binding. Simply use one of the free bits in QV4::Managed for that. Also changed a bit more code over from v8 to v4. Change-Id: I6e787e611041e058fe109df1d7a13598655f8eba Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Add support for generating stack traces to QV4::ExecutionEngineLars Knoll2013-05-221-9/+3
| | | | | | | This makes it possible to remove the v8::StackTrace API Change-Id: I53eee022a1030f0f6bf9a9268ca7cd3d5975724d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove v8 dependencies in qhashedstringLars Knoll2013-05-221-2/+2
| | | | | | | Also remove now unused API in v8::String Change-Id: I2570aedf407c89ad85da01cf0e2153a52b4e562d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Get rid of v8::BooleanLars Knoll2013-05-211-1/+1
| | | | | Change-Id: I10b4240db78532dfdf972bb0a6f191462d81caaa Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Get rid of v8::NumberLars Knoll2013-05-211-1/+1
| | | | | Change-Id: I38bdf8fe4dd73c61317912ec6308a9a1e870ad99 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Get rid of v8::IntegerLars Knoll2013-05-211-1/+1
| | | | | Change-Id: I6b9ab830c4ff3cbf986dbcf7c056648b5a16a222 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove v8 dependencies from QQmlV4HandleLars Knoll2013-05-081-1/+1
| | | | | Change-Id: I87d2183738ec7cfeea846a28f2b9aed79a233f68 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Convert qv8Valuetypewrapper to use QV4::PersistentValueLars Knoll2013-05-081-11/+11
| | | | | Change-Id: I175bd2d84425c5ae9497a5a3644474bee34e1a5b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* More steps towards eliminating the v8 layerSimon Hausmann2013-05-071-1/+1
| | | | | | | | * Changed the return type of the InvocationCallback from a v8 handle to a QV4::Value * Removed v4 auto tests and fixed build of other tests Change-Id: Ic927b925923ca8785170689a5c260969fd1cb794 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Replace v8::Undefined() with QV4::Value::undefinedValue()Simon Hausmann2013-05-071-2/+2
| | | | | Change-Id: I4c7bb5bcc1bc15a982bb83d2597e6ae4bc5710cd Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Get rid of v8::LocalLars Knoll2013-05-061-11/+11
| | | | | | | | | The class was doing exactly the same thing as v8::Handle in our implementation. Removing it cleans up quite a bit of code. Change-Id: I37a3dcdef062fc388751e9ef0a158b5926ba2efb Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Move QV8Engine::to/fromVariant over to a v4 based APILars Knoll2013-05-011-2/+2
| | | | | Change-Id: Ie44de10cbd970715345e2c428db666dc6233b39c Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Move more methods on QV8Engine over to use v4 based syntaxLars Knoll2013-04-291-1/+1
| | | | | Change-Id: I7d3501a2c4cd0d749c7c30b5c60fee12cde58aa4 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Get rid of QV8Engine::toString()Lars Knoll2013-04-291-2/+2
| | | | | | | It's easier to use toQString() on a QV4::Value Change-Id: I9bf22cb72607b32948e77c632d2f9b8fe120ea41 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Rename QQmlV8Handle to QQmlV4HandleLars Knoll2013-04-191-1/+1
| | | | | | | | | The handle wraps a V4 Value, so this is the better name for it. Also added some accessor methods to convert to and from V4 Values. Change-Id: I327c83feb5bd3be59909001489979e5a3a9d9e67 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-101-1/+1
| | | | | | Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-231-24/+24
| | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Restrict v8 property lookup to the execution contextMatthew Vogt2012-08-271-3/+4
| | | | | | | | | | | | | When resolving property names, only properties known to the current context of execution should be available. If a property name has been overriden by a component extension, code executing in the context of the base component should resolve the property name to the property available inside the base component or its bases. Task-number: QTBUG-24891 Change-Id: I9687cc28e108226d5a939627a901c8254344b598 Reviewed-by: Michael Brasser <michael.brasser@nokia.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Increase test coverage for V4Matthew Vogt2012-08-231-0/+6
| | | | | | | | Add test for integer operations, Math functions and exercise some previously uncovered code. Change-Id: Idff3f3672498775ac117ca98bf34b0fe96cbf760 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Reduce memory consumption of source coordinatesMatthew Vogt2012-08-161-1/+1
| | | | | | | | | | Reduce memory consumption by storing source location coordinates as 16-bit variables (in run-time structures). Also modify qmlmin to restrict line lengths so that the column bound is not normally exceeded. Change-Id: I08605626ffbdf081b6da2aea1116bdfe24998572 Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Permit value types with metatype IDs >= QMetaType::UserMatthew Vogt2012-08-101-3/+2
| | | | | | | | | Remove the assumption that value types must be types defined by Qt, having metatype IDs below QMetaType::User. Task-number: QTBUG-26352 Change-Id: Ib5a56ff2e7892e82adf17a3a1e7517a0c9fe0534 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Allow invokable functions of value-type classes to be calledChris Adams2012-08-091-5/+10
| | | | | | | | | | | | Previously, invokable functions of value-type classes were returned as properties. This commit fixes that bug by allowing such functions to be invoked normally. It also improves copy-value type handling. This commit also ensures that QMatrix4x4 value types are constructed with qreal values as this is the storage type used internally. Change-Id: Iab0fe4c522ed53d60154e8a8d46dda925fb9f4de Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix value-type semantics in variant propertiesChris Adams2012-07-241-29/+67
| | | | | | | | | | | Previously, variant properties storing value-type values would be treated as value-type-copy values rather than value-type-reference values. This caused inconsistency in behaviour with value-type subproperty assignment. Task-number: QTBUG-26562 Change-Id: I524ee06ab8e02bf9582c1a88f3317278199225e0 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix broken value-type support by allowing property definitionChris Adams2012-07-111-0/+9
| | | | | | | | | | | | | | | | | | | | | In QtQuick 1.x the "variant" property type was supported, which could be used to allow value type properties to be defined in QML. In QtQuick 2.0, we have deprecated the "variant" property, but its replacement ("var") is not suited for defining lightweight C++ type values (such as QColor, QFont, QRectF, QVector3D etc). This commit allows those QML basic types to be used in QML once more, by supporting them in the property definition syntax. Note that since some value types are provided by QtQuick and others are provided by QtQml, if a client imports only QtQml they can define but not use properties of certain types (eg, font). Task-number: QTBUG-21034 Task-number: QTBUG-18217 Change-Id: Ia951a8522f223408d27293bb96c276281a710277 Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
* Merge master into api_changesKent Hansen2012-03-191-2/+2
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/qml/debugger/qqmlenginedebugservice.cpp src/qml/qml/v8/qv8qobjectwrapper.cpp src/quick/util/qquickimageprovider.cpp tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp Change-Id: Ie78ba2fabd32f4812bcae9dbdd66ed289dc11dcb
| * Remove binding dependency on QQmlExpressionAaron Kennedy2012-03-151-2/+2
| | | | | | | | | | | | | | | | This is the first step to creating much lighter weight bindings that are tuned for the specific scenario in which they're used. Change-Id: Ib985dcff25679b711b5c634bbc891aa7902bf405 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* | Improve support for var propertiesChris Adams2012-03-051-0/+7
|/ | | | | | | | | | | | | | | | | | | | | This commit changes the semantics of function assignment in QML. Previously, function assignment was interpreted as binding assignment. Now, function assignment is interpreted as function assignment, and therefore fails for all property types other than "var" properties. To support imperative binding assignment, a new function was added to the Qt object: Qt.binding(function) which takes a single function parameter and returns a function object which will be interpreted as an assignable binding expression by the QML engine. Finally, this commit also slightly changes the semantics of var properties in that the "special" JavaScript values of null and undefined may be assigned to var properties, rather than being interpreted as reset requests. Task-number: QTBUG-21842 Change-Id: Iee99a878b9badf0fb76e983da7ebfa493f55ceb5 Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
* Rename QDeclarative symbols to QQuick and QQmlMatthew Vogt2012-02-241-0/+387
Symbols beginning with QDeclarative are already exported by the quick1 module. Users can apply the bin/rename-qtdeclarative-symbols.sh script to modify client code using the previous names of the renamed symbols. Task-number: QTBUG-23737 Change-Id: Ifaa482663767634931e8711a8e9bf6e404859e66 Reviewed-by: Martin Jones <martin.jones@nokia.com>