| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
All other changes are just to be able to include qv8engine_p.h in
qv4engine_p.h
Change-Id: I71ba2ec42cdc20d5c7d97a74b99b4d1ada1a5ed8
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As the various file names are actually not kept as QStrings in the
respective objects being profiled, our saving them as QStrings in each
and every profiling event is not implicitly shared and causes a huge
memory overhead. Avoid that by saving each location only once, indexed
by a disguised pointer to the object it refers to.
Normally, objects could disappear during the profiling session, and new
objects could be allocated in their place, which would mess up our
indexing system. We prevent that by referencing the objects when we
index them, thus preventing them from getting auto-destructed.
Mind that those are not JavaScript objects but rather functions,
bindings, components and the like. So, this will only cause a memory
leak if you're compiling and dropping QML components over and over.
Task-number: QTBUG-52937
Change-Id: Ia4dfb09a71a5c9a2d6ce25c3811bbe2a1036c1c1
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|\
| |
| |
| | |
Change-Id: Icfa1d61fcc286c3418d4a625de11d2191336fa60
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This in theory happen for attached property types.
Fixes Coverity CID 154272.
Change-Id: I113797dea8949877cbeac82bae57655170878d4c
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| | |
... in string comparisons. It's more efficient.
Change-Id: I3be5a2be9ba5d55546472eac28f5f639a496bf3b
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see
http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/
Updated license headers to use new LGPL header instead of LGPL21 one
(in those files which will be under LGPL v3)
Change-Id: Ic36f1a0a1436fe6ac6eeca8c2375a79857e9cb12
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
|
|\|
| |
| |
| | |
Change-Id: Ica75a71062d0613e415f2433c5c22c2e251b37cd
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes a regression introduced by change
01c0c0963794f4dd8c3601e8340cc3dc4dec41bd, where interceptors
wouldn't work correctly on alias properties.
This required some refactoring and splitting out the interceptor
handling from the VMEMO into it's own class, as we are now
installing bindings directly on the target property of an alias and
not on the alias anymore.
We now resolve the target property inside the QML object creator
and install a interceptor metaobject on the target if required where
we can then register the interceptor.
Change-Id: I3ebc8f492ce5dcab7acf901711b47336d5182ffa
Task-number: QTBUG-49072
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|\|
| |
| |
| | |
Change-Id: I11ea57222ba5aa683b7bfd7735fbc1d2cf86e875
|
| |
| |
| |
| |
| |
| |
| |
| | |
Change-Id: Ic06af4805da987dd08e361f2668e7a1788d3eefe
Task-number: QTBUG-43581
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
|
|\|
| |
| |
| |
| |
| |
| | |
Conflicts:
src/qml/debugger/qqmldebug.cpp
Change-Id: I93de5a81b18cdece475870cf7cfba1b9baef2304
|
| |
| |
| |
| |
| |
| |
| | |
Returning a PersistentValue doesn't make much sense.
Change-Id: I6044a12e48aa835ef78008e070bacda5125a7ca7
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: in Qt Quick Controls 2, enums declared in the abstract
C++ base types were not accessible with the concrete QML type name,
but had to be referenced using the base type name:
Slider {
snapMode: AbstractSlider.SnapOnRelease
}
Solution: this change resolves the C++ base type and creates the
missing link between the composite type and its base type's meta-
object. This allows referencing enums using the concrete/composite
QML type name:
Slider {
snapMode: Slider.SnapOnRelease
}
Change-Id: Icefdec91b012b12728367fd54b4d16796233ee12
Task-number: QTBUG-43582
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| | |
Reduce usage of ScopedContext.
Change-Id: I84a6a7478065de3398fd0b21596ca1308e78ceb3
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When creating new QML contexts, these are not used directly,
but rather as scopes for other functions. Change the
behavior, so that newQmlContext doesn't push the new context
onto the context stack.
Change-Id: I8254da3f660c4791941835c925b9892274ea51b0
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Qml Connection objects where using an awkward way to
make the parameter names of signals available to the
signal handler. This now uses an approach that is
equivalent to what we do with other functions.
The main difference is that we can't know the parameter names
at type compile time, so we have to rewrite the internal class
of the QV4::Function at connect time.
Change-Id: I5e538ac840b5a46ccb14ff71684404d947948324
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|/
|
|
|
|
|
|
| |
QML source code is supposed to be in UTF-8, including signal
specifications.
Change-Id: Ic2d0aef579addabf39b3910393a77989130bc11a
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
Instead create QmlContext's directly as they are the only
thing used from the binding wrapper.
Change-Id: If3a987134dee9e85b6a76ed74aacd76b19279117
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
Even though the goal is to get rid of the contextwrapper, this
helps in the meantime.
Change-Id: I234ef39f74fb0eee78710884de6a1c90763bce74
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I3ca148ae021ffc349b943231cc749828b0b7816c
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Refcounting our bindings greatly simplifies our memory management
of the objects and ensures we safely clean them all up. In addition,
it allows us to remove the m_mePtr and weak reference handling from
QQmlAbstractBinding as we can safely handle this through the same
mechanism.
Change-Id: If23ebc8be276096146952b0008b62018f5d57faf
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
This removes the need to save some bits in the abstract binding
object, and should make it easier to move QQmlAbstractBinding
over to be reference counted.
Change-Id: Ib46cb3217f3dc462f1dcaa6153d90ea2f7401f48
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I3df6ac107cb46b3a1b15b80f39d7c6015adcd9ac
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: Ib8a222c26316ad31699d3becaa945ac4035e437b
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
Reduce the number of setBinding/removeBinding overloads and
simplify their internal handling.
Change-Id: I87174a3b2dc0ecb8380e8fc28f8969fbf475c728
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
Rename QQmlAbstractBinding::object() and propertyIndex() to
targetObject() and targetPropertyIndex()
Change-Id: Ic50da69e7a7c6412b5abb36f433be046e6566763
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
| |
This simplifies the code for further refactoring.
Change-Id: I6bcb5ce397f642242af80ce37dc8bba1fa9bf3f5
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
The pointer is never used in practice, so let's get rid of it and
save some memory.
Change-Id: I8dccafb4cd3e14397fcf1c30633d60ea7ea9ce0c
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
Even for the id property binding we can use the property data cache and
therefore avoid string hashing.
Change-Id: Id9a4ca3159cdfe5ba93060f1bc8626e70140daa1
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
For example massive amount of Item{} objects that are "children" of another
item and thus get assigned to the default data list property. Instead of
repeatedly retrieving that list property via a meta-call, we can do that only
once and re-load if necessary.
Change-Id: Ia7d10b84b3c7dca58d9f0b4b2138bd6f916c128d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
Avoid repeated string hashing and lookups in the property cache in order to
retrieve the property details when initializing literal and script bindings.
Instead we now cache the property data at type validation time, similar to how
the property data was encoded in the VME instructions in the old engine.
Change-Id: I3957c7c4c3e26dfa97c4880b23940a3755ee90e4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
| |
We don't need to convert from a QHash to a QVector in order to populate the
property name cache in QQmlContextData.
Change-Id: Ifa8e4f64a1e174907e92684b2d38abaf0a4a705c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
| |
Avoid copying url and file name twice into the context every time we
instantiate an object.
Change-Id: I1c76b80b9c44f95512af5899d760151f6dcd7bb5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
| |
Avoid the creation of the QML binding wrappers if we don't need it, by
moving the creation into a function that creates it on demand.
Change-Id: I1af6a8507a114c1a0b83374704981b7ed4c4a3fc
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
| |
In the common case of no 'import "Foo.js" as Bar' we can avoid the creation of
the JS array that holds the script references.
Change-Id: I6704bd9efaf8681f939a148b2cb0a1de2cb22d80
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
We use stringAt() to retrieve the name of the id property of an object but all
we do with that string is check if it has a length. So if an id is set, we
allocate memory and copy the string data into a new QString, and if it's not
set then we get a default constructed QString. Either way the string isn't used
and we can simply check for whether the id is set by checking if the idIndex is
non-zero.
Change-Id: Ib84fb05ed31c59f7e85dac72ab61b4d3bc9c902b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
| |
Avoid re-using the same variable for different purposes, so just pull in the
first use into the tight scope and the second "property" variable close to
the loop it is used with.
Change-Id: I3a325478f9e56413b65dea9c7e05566497fbc6cf
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
| |
Qt copyrights are now in The Qt Company, so we could update the source
code headers accordingly. In the same go we should also fix the links to
point to qt.io.
Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9
Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: Icd76d3d03fac2e57530e55f8ec15b97109dcdcbc
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead pass a const Value & into the functions
With our new inheritance structure, we can get rid of ValueRef
and instead simply pass a pointer to a Value again. Pointers to
Values are safe to use again now, as they are now guaranteed to
be in a place where the GC knows about them.
Change-Id: I44c606fde764db3993b8128fd6fb781d3a298e53
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
| |
This prepares things for a rewrite of the internals of Persistent.
Change-Id: Ib93ec5911984d1bfce87ffdc3f86bc75f6ecafe9
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: I50d981b277187327c2c63f8372f64db1300ed9ef
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: Iaf807add5d971e96cac57e38e13385e901f9c930
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
| |
This is no longer required, and simply uglifies the code
Change-Id: Iba91a1d7735ebe23a43437f137a488423b6eb743
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: Ide7c81735be4662ff45bf268cfe750ff1f784453
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: I668cef1363a5c1a5c5b9a7e138f3bd0338712eea
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We used to encode property index and value type property index in one int
with 16 bits each, for example font.pixelSize with index of "font" in the
lower 16 bits and "pixelSize" in the upper 16 bits.
Detecting if a given encoded index was using value types or not was based on
whether the value type index (upper 16 bits) were non-zero. That assumption
holds given that all valid property indicies of value types are > 0 because
they are all sub-classes of QObject, which provides the first property
(objectName).
With the introduction of gadgets property index zero will become popular again,
and value types are a core use-case for gadgets. Therefore we need to change
the encoding to allow for zero to be a valid value type property index. This is
implemented by centralizing all decoding call sites to call one function that
indicates -1 as non-present value type core index return value. That way we can
encode the index with an offset of 1.
Change-Id: I266abf140211a4f7204b47b94d07c364f0a8f408
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: I7fae0710d148a2b07ec5f36a7fb96c2b645e564e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the QQmlScriptString we store the binding id and it is an index into the
runtimeFunctions array of the compilation unit. However we don't store the
compilation unit and instead in QQmlBinding and QQmlExpression try to retrieve
it from the cache via the context url (we have the context after all). That
turns out to be not a reliable way, as sometimes the URL might slightly differ
from the originally compiled cache (qrc:/// turning to qrc:/ maybe).
Consequently the type is (unnecessarily) compiled again and unfortunately not
_linked_, therefore the runtime functions array is empty. Another option is
that when the component was created from a QByteArray, then no entry exists in
the cache in the first place.
This patch addresses the problem by storing a reference to the compilation unit
in the QQmlContextData. That we can safely retrieve and it'll make sure the
compilation unit also stays alive.
In the process of that the manual reference counting was switched over to
QQmlRefCount and QQmlRefPointer for QV4::CompilationUnit.
Task-number: QTBUG-41193
Change-Id: I9111f9a3b65618e453954abcd789c039e65a94f7
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some features, like the memory profiler, create huge amounts of data.
Often enough, we're not actually interested in all the data available
from the profiler and collecting it all can lead to excessive memory
consumption. This change enables us to optionally turn various aspects
of QML profiling off.
Task-number: QTBUG-41118
Change-Id: I7bb223414e24eb903124ffa6e0896af6ce974e49
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
|