aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/v8
Commit message (Collapse)AuthorAgeFilesLines
* Merge master into api_changesKent Hansen2012-03-197-94/+108
|\ | | | | | | | | | | | | | | | | | | 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
| * Allow threaded compilation in an async LoaderMartin Jones2012-03-151-4/+23
| | | | | | | | | | | | | | Enables threaded compilation for a Loader "source". Change-Id: I2d60a3ace07aab58f3b8f069e45a2864178c959f Reviewed-by: Chris Adams <christopher.adams@nokia.com>
| * Fix crash caused by dereferencing collected v8 dataChris Adams2012-03-151-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a var property of a QObject is read after the v8 data associated with the qobject has been deleted but prior to the DeferredDelete event being processed, the varProperties array will be null and a crash will occur. This patch ensures that we check for this condition in both the access and set codepaths for var properties, and also ensures that an object which has previously been queued for deletion cannot be referenced in JS. Finally, it adds a unit test to ensure that we don't regress. Task-number: QTBUG-24748 Change-Id: Idde384ca01e18f4dcf9e376e9379f2c5eb410e14 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
| * Remove binding dependency on QQmlExpressionAaron Kennedy2012-03-153-9/+6
| | | | | | | | | | | | | | | | 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>
| * Ensure that dynamic property storing QObject ptr notifies on deleteChris Adams2012-03-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously, when a QObject ptr was stored in a dynamic variant property, the value of the property could change (to a zero ptr) if the QObject was deleted without a notify signal being emitted by the QDeclarativeVMEMetaObject which stores the property. This commit ensures that such a notify signal is emitted correctly. Task-number: QTBUG-23451 Change-Id: I5689abd984b177737f8d5f18950838b73ebde328 Reviewed-by: Martin Jones <martin.jones@nokia.com>
| * Let V8 throw the exception when QML property lookup failsKent Hansen2012-03-141-12/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only V8 knows whether a failed property lookup should actually cause a ReferenceError to be thrown. When evaluating a "typeof" expression, for example, a ReferenceError should not be thrown even if the expression involves global variables that don't exist, according to the ECMA-262 specification. QML should try to match the standard JavaScript behavior. This is achieved by simply returning an empty value handle (to signify the absence of the property), and leaving it to V8 to throw an exception as appropriate. Task-number: QTBUG-21864 Task-number: QTBUG-24448 Change-Id: I9945adcab98fc3b801371163367473d6af0ab31a Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
| * Use the same ReferenceError message wording as V8Kent Hansen2012-03-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | Instead of "Can't find variable: foo", use "foo is not defined". This is in preparation of letting V8 throw the exception when a property lookup fails on the QML scope object (needed for QTBUG-24448). Change-Id: I3c747482a8ef138dad9a85530a4f6b5c4c818a03 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
| * Remove the usage of deprecated qdoc macros.Casper van Donderen2012-03-133-63/+63
| | | | | | | | | | | | | | | | | | | | QDoc now has support for Doxygen style commands for italics, bold and list items. This change applies that change in QDoc to the actual documentation. Task-number: QTBUG-24578 Change-Id: I62d203f21df63a95ee236e578b10418fd9680707 Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* | Crash fix after QMetaType change.Jędrzej Nowacki2012-03-132-3/+14
| | | | | | | | | | | | | | | | QMetaType::UnknownType was added so we can distinguish between "void" and an unregistered type. Change-Id: If8cee21b3f84bf129343dc457d10ab31a9bfc8b8 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* | Adapt to Qt5 meta-object changesKent Hansen2012-03-131-13/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QMetaMethod::signature() has been renamed to methodSignature(), and it now returns a QByteArray. Also, the new function QMetaMethod::isValid() should be used to determine whether a method is valid, instead of relying on signature() returning a 0 pointer. Where it makes sense, the existing code that was using signature() and parameterTypes() has been changed to use the new API QMetaMethod::name(), parameterCount(), and parameterType(int). Also, in the new meta-object revision (7), the QMetaObject stringdata member is now of type QByteArrayData*. QFastMetaBuilder will be ported to generate the new format, but for now it's sufficient to reinterpret_cast the stringdata assignment to keep it compiling. Change-Id: Ie340ef17bcebc3afa4aae6450dfe2d06e4d881a4 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* | Merge branch 'master' of git://gitorious.org/qt/qtdeclarative into api_changesMatthew Vogt2012-03-121-11/+14
|\| | | | | | | Change-Id: I578b1e2f1bb374da6194e6ba04a0fd459b2632fe
| * Don't grow container when desired size is knownJoão Abecasis2012-03-091-11/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QList<Type>::reserve() is used upfront to allocate necessary memory in a one go. This tells us straight away whether allocation is possible at all and reduces re-allocations and consequent memory copies. This also has the side effect that no spare memory is allocated, also allowing up to (and including) INT_MAX elements to actually be stored in the underlying QList, as long as enough memory is available to satisfy the allocation request and subsequent fill. The qqmlecmascript::sequenceConversionIndexes was changed to not attempt INT_MAX allocations as, given enough memory and virtual address space, that might succeed but take a really long time. Change-Id: I4b0c965e9c23be78874343a70d7c155933c80903 Reviewed-by: Chris Adams <christopher.adams@nokia.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* | Merge remote-tracking branch 'origin/master' into api_changesLars Knoll2012-03-071-3/+1
|\| | | | | | | Change-Id: I121cb9c9316b5e47476dcb982bc28b6f3f358f78
| * Compile after API changes in QCoreApplicationGunnar Sletta2012-03-071-3/+1
| | | | | | | | | | Change-Id: I6bc6978a5c68503facd8085bd35e66f86af58a90 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | Allow function assignment to cause binding for non-var propsChris Adams2012-03-051-4/+25
| | | | | | | | | | | | | | | | This patch maintains the old function-assignment behaviour for non-var properties, and will be reverted soon. Change-Id: I523e464501106616c51ff7478f7eb7171c1ca350 Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
* | Improve support for var propertiesChris Adams2012-03-056-18/+116
|/ | | | | | | | | | | | | | | | | | | | | 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>
* Merge master <-> api_changesMatthew Vogt2012-03-0519-167/+440
| | | | Change-Id: Iad2f07b989b25349fd2d4fff010e24dcd5a1688f
* Rename QDeclarative symbols to QQuick and QQmlMatthew Vogt2012-02-2457-0/+15218
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>