| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
| |
QQuickPathView's attached object uses a dynamic meta-object. So when installing
bindings - such as a signal handler - on it and we want to determine the
property cache for it, we must not use the QQmlEnginePrivate::cache overload
that takes a QObject pointer, as that will - rightly so - return a null
pointer. Instead in this case it is okay to go with the static type overload,
by using the meta-object of the attached type known at compile time. This is
consistent with the VME code path.
Change-Id: Iffc64f7ee4677c6cc60d071b80f4032cf8037ab7
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
Some auto-tests use the incubation controller with a one-step boolean,
so shouldInterrupt() always returns true. When we're in the finalization phase
enabling the bindings one-by-one, pop one off the bindings stack and enable it
_before_ doing the shouldInterrupt() check. Otherwise we don't progress at all.
Change-Id: Ibd5bbc253f8e8f74b08c91b018533c9e2735d2c8
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
| |
If the QML puppet disables onComplete callbacks, we must obey that also
in the new code path.
Change-Id: Ic9b74c6a5ee04dc5b8e4f545a8e6cc0fa8dd28f1
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: I592518444ef353cfcf153df0e6afa2fbac613560
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
| |
Add profiler tracing calls during objection creation and make sure to set the
function token / source location correctly for the synthesized function
declarations of signal handlers.
Change-Id: Ie4f8accce3a5c5d1d57bb0646cda588b89b76718
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We need to track the objects created and pass them over to the VME guard used in the
incubator. The incremental build nature of the incubator requires that to avoid crashes.
For nested incubators we need to set the activeVMEData field in the root QQmlContext, to allow
child incubators to locate the parent.
Lastly we need can emulate most of the VME behavior in terms of build states when running with
QQmlInstantiationInterrupt by presenting four build steps: The initial state, two build steps,
a finalization step and the state when we're done.
Change-Id: I16cd7f71744decb9d4735ec77e9d944fad18e88d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Make sure to remove earlier set bindings for any value type property, not just
scripts. We want font.bold: false to also override an earlier actual binding
for example.
* Propagate on assignments on qualified property names throughout the
chain of bindings - that makes it easier to detect them early on.
* The group property collection in the bindings validator should only include
value bindings to group properties, not on assignments - as they can always
appear in parallel.
Change-Id: Ib7ec4de755a5a8d269324a77cba36eb945366274
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
| |
Saves 12 bytes per Function
Change-Id: I9a495805f9201eb6162a520ff5c2defeb73dc37a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Michael Brasser <michael.brasser@live.com>
|
|
|
|
|
|
|
| |
watcher for self-deletion
Change-Id: I809a4860831847ab61c7ca0ba302057ec165ee24
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
| |
Move SharedState into its own top-level structure.
Change-Id: I0b6baeade57ff342df23672808d77933fa6ad26d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
| |
For the warnings to have the correct column/line number information, we
need to set it on the QQmlData before calling the custom parser.
Change-Id: I6e1c729491df6af846e41ee88e785b32e4715751
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make sure to pass onFooChanged handlers to QQmlConnection's custom parser by
not relying on the signal handler converter to set the
IsSignalHandlerExpression flag. That should only be set for real signal
handlers, the custom parser gets the raw bindings.
Also don't try to initialize bindings at creation time the custom parser
covers.
Change-Id: Iae22bc886c312843136f073959e59da440f4184c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
| |
QQmlPropertyMap is treated as a type that cannot be cached with QQmlPropertyCache,
doesn't allow for accelerated property access and also doesn't allow for declarations
of any kind in sub-types.
Change-Id: Id8a6811120aa61ffb5037394e758cc62501e0fc3
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
| |
Fix bug in QQmlCompiledData refcounting.
Change-Id: I09528419c602d3173db2f13c516d2f0d79abd92e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
| |
Initialize the binding's self-pointer before calling addObject(), as some funky tests
try to delete the binding from within there and the self-pointer allows us to find out
later that the binding was deleted.
Change-Id: I8c9e3fe7304f304eace29c0631263b1ec021a8c4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: I9c6d7f2f0983274ecb8b7cc15c0dbe21f3e0d58f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
Force the type of the property to write to int, if we resolved the enum earlier
at type compile time. This is consistent with the VME and allows for
assignments to enum properties without a string converter. Fixes
tst_qquickgridview in particular.
Change-Id: Ic29f4a6115930bd7fff45f1658c00d0bfc24c7ec
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
| |
It is perfectly valid for example to do
Behaviour on someColor.r
Change-Id: I39961509b4698c19441f71baa4af197f633c5b39
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
It can happen that even during initial binding evaluation, additional
finalization callbacks are registered. Catch those by setting the
activeObjectCreator pointer in the QQmlEngine accordingly - the VME does
it the same way.
Change-Id: If0fc902a4c8bdf7e8eec17bf433fd2bf11be7c04
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
| |
Share finalization callbacks across all sub-instances of ObjectCreator,
by moving into into SharedState.
Change-Id: Ibcd679caecd2009b4705d04c859b2fea4c2295fd
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
| |
We should point to the expression itself, not to the property.
Change-Id: I1d5b7dd80f7865076852228985717f79ceb79134
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
| |
Similar to commit 5dc7649f5ad7dca6e13707e827d001c3f118a6ef in the vme, we
need to set the pending binding bit for non-value-type property bindings
in order for the optimization to work and the tests to pass.
Change-Id: I89c0a3ea78c331b9c82eb8595bd4ab252b271ab5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Don't create prototype Object for bindings and
signal handlers. It is inaccessible and not required.
This saves one Object-sized allocation per binding.
* Shrink the size of QQmlContextWrapper by removing
the v8 member variable.
* Shrink the size of QObjectWrapper by moving the destroy
identifier to the engine.
Change-Id: I76e84e4c0581e97a19d2e959f814ac84d9c431fa
Task-number: QTBUG-37134
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
| |
QmlObjectCreator -> QQmlObjectCreator
Change-Id: I23da2d9c7fa0dcd760f5cc695c1759b44d1e72f0
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
| |
Collect variables shared across recursive instances in a SharedData
structure, get rid of some other members.
Change-Id: I8d52fbb34820ce17d754b91c3fdee9e534a95753
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
| |
We need a scope object protector right after creating the JS wrapper,
which is right after creating the VME meta object.
Change-Id: I76668027486a44bab35a3193b4c1c6fbab5c3e0e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
When instantiating an anonymous component, we must also set the context
ownership to true.
Fixes garbage collection of item view delegates, where when the destructor
run, their context wasn't cleared properly and child items would re-evaluate
bindings that use "parent" with null.
Change-Id: I8c67c679c12ce987a0dec405571647270373881c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
| |
This brings up the list view in the components gallery.
Change-Id: Ib91ca3b30b8093acad0343b47be60cf4b51e4da7
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
| |
The object tree construction and binding allocation remains synchronous, but
the initial evaluation of the bindings is now cooperatively interruptible
again, like in the VME.
Change-Id: Idd037dd481782c81ad43e20e93d922eb12ac8b85
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Pre-calculate the amount of space we need for binding and parser status
callbacks at compile time and therefore use a much simpler data structure
(vector) to store the points to the bindings and callbacks. They need to be
stored because during object construction and binding enabling phase, it may
happen that they get destroyed and thus their m_mePtr pointing into the array
gets deleted.
The contiguous vector will also make it possible to interrupt the completion
phase.
Change-Id: Ic7c985bb8325ab355112e30e9d33d6ae4e7476d1
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
| |
It may happen that QML created objects get garbage collected, as they'll
be initially JS owned. We don't want that to happen, so we have to
protect them, similar to the qmlBindingWrappers array in the VME.
Change-Id: Iec541dccced46ac8aab447cd0558d22b84e3eac0
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
| |
qmlContext(this) is expected in re-implementations of classBegin(), so just
like the VME we have to be careful that we call it after setting the context
on the ddata.
Change-Id: I38ad8d1a4e4093368f62f9d57718de3b8cd0cfd2
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
| |
We must take the imported scripts from the creation context. Fixes various
errors in Qt Quick Controls.
Change-Id: I336d8ffa0537cefd4eeac15f98bbf1b0a5c784af
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
You can have a binding like this:
property point blah: Qt.point(someX, someY);
and later you can have bindings on
blah.x: { someExpression }
In that case we need to clear the binding on blah.
Change-Id: I27bfa6ab0f104bf989803c5910e6094767429c03
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
| |
When installing bindings on aliases, make sure to follow the alias.
Change-Id: I860a5bf6b5aba838727385f26e50e3d1bf0c8ea8
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: Iaf96dabb1b3de81aae75953fd261dfc3b562169c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
| |
It's allowed to call destroy() on them, so allow for destruction
unless the constructor set ownership upfront.
Change-Id: I3887c5ab1bb6de7de3b0c7b14f4791d4ed1e0979
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since commit 3d958cec8d53094a1bbab895377e451b07716e1f (loong time ago!)
property bindings are stored in a linked list and newly encounted bindings
at parse time are prepended to the list, causing the binding processing to
happen in reverse order.
There are however exception to the rule. For example list bindings are processed
in declaration order and assignments to the default property are sorted by
location in the file.
In addition various tests rely on value properties being installed first, then
followed by signal handlers and group/attached properties.
Change-Id: I3bcae29faec5b2420fbba362cd81b8ba960ed19f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
themselves
They should share the imports from the importing context, which means
context->importedScripts needs to be initialized before calling
scriptValueForContext, because it accesses it.
Change-Id: Ifed22555028e03d597954ba1a18e546bfb901c58
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
| |
Always install the property cache on the ddata, not only for types with
a VME meta object, as the cache has the correct revision cache.
Change-Id: I82352df867c1045b37152013eb924aafde2ee874
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
| |
signal handlers
Functions need to be setup first, like in the VME.
Change-Id: I4d1cffa04cb2b3ba7027c3720d55133253a1bad7
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
| |
... by taking some code from the old compiler. This speeds up some bindings
and maintains compatibility.
Change-Id: If80b1e28214cb655f70fff01a8c885edcb2d3030
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: I22c3e3f8e9a06928a23700b657a656a0db37d48d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
| |
Use the same logic at object creation time as during the signal handler
conversion phase.
Change-Id: Idb48a3849da7b6543ec50c15e1ccbf2939c3ee39
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: I644dcea86fa886a6a2dc7cd230ad6942d165c4c5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
| |
Most property assignment errors are now handled at type compile time, just
like in the old compiler. This speeds up the object creation code and
restores behavior expected in the qqmllanguage tests.
Change-Id: If213cd0bfa4dd51d9065c27809a79a6495c9f3ce
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The only exception are initializers for read-only property declarations.
Also adjusted the error location of one test to point to the correct value
location as opposed to the property location, as with all the other similar
errors.
Change-Id: I2333d3c485fc374b1b39a5f5a4408af5cf08a20f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* When reporting errors with literal bindings, use the correct location for the report,
the place where the literal value is declared.
* Create property caches for group properties, so that later in the property
validator we can do extra checks
* Report an error when trying to declare an object to the default property of a group
property
* Similarlyl report an error when trying to use sub-objects with value type properties
* Temporarily change tst_qqmllanguage::errors() to also try to instantiate the component,
because for the moment some errors are only reported at instantiating time instead of
compile time. That'll be fixed later when move checks get moved into the property validator.
Change-Id: Icaa8d2edc7918c03001c40fba7880ee5cac10e69
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
| |
When a type declares a new default property, then the old default property
continues to apply to its own bindings.
Change-Id: Iafeec772baa4e1a430b09eed0b348b83984246cd
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
List model definitions make heavy use of custom parsers, which requires AST
access as well as a general port to the new QQmlCustomParser API.
Additional fixes in the custom parser support were needed to pass all tests:
* Fix support for AcceptsSignalHandlers and AcceptsAttachedProperties
* Don't call setCustomData unless the compiler generated data earlier
Change-Id: Ic42f8a890391267c94f63d35f055b60fdbf3c83d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|