| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When an alias points to a child object which has not yet been
initialized, it's id won't have been registered yet, so setting up a
binding to it will result in a crash.
The fix is: when setting a binding target fails, and its target property
is an alias, queue them until all bindings have been set up, and try
again.
Task-number: QTBUG-57041
Change-Id: I4dc5a6d25c0a32fed9fd952c955e2006c76be45a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
(cherry picked from commit aa94c6c0469b0595f483f13ac88459f0035deef9)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QQmlData is shared between engines, but the relevant QObjectWrapper is
not. Since 749a7212e903d8e8c6f256edb1836b9449cc7fe1 when a
QObjectWrapper is deleted it resets the shared QQmlData propertyCache.
In most cases the propertyCache except when a property updated in an
existing binding in the first engine, where it currently asserts.
Task-number: QTBUG-61681
Change-Id: I6efdc506e5c7e30b95cda1be282afa9feb781cd2
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
tools/qmlimportscanner/main.cpp
Change-Id: I01e17581f6691a03f83788773364d0cf96319514
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We want the IDs to reflect the location and the type of event that is
happening. Thus all instances of a particular component should share
the same IDs for their bindings. Otherwise the aggregated views of the
QML profiler list the same locations again and again for each object.
Change-Id: I3f8a7531589b42f785e40c7c5b04b229f639d696
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp
src/plugins/qmltooling/qmldbg_inspector/globalinspector.cpp
src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp
src/qml/qml/qqmlimport.cpp
src/quick/items/context2d/qquickcontext2dtexture_p.h
tools/qmleasing/splineeditor.h
Change-Id: I8f6630fcac243824350986c8e9f4bd6483bf20b5
|
| |
| |
| |
| |
| |
| |
| |
| | |
Like this we can remove the QQmlBinding::create() overload
that takes a FunctionObject.
Change-Id: Ib6c37395ded325e68cf0fbf3afd08fb6dd6efa3b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Instead, simply create a QmlContext, and setup the bindings with
the QV4::Function itself.
Change-Id: I9db93b15112e43a6d5e275d126fb20f9c8833e8f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: Ia62d380945250015009d9c2b6ed65f6d830277ef
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I070f73f106440667fce2c7fe33310369a6aa1376
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| | |
This is what's in the Value in all cases anyway.
Change-Id: I212c4c4076050e8d0ea4cf6f72a1683e132cd51b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Move the function() accessor from QQmlBoundSIgnal to
QQmlJavaScriptExpression. Change the profiler to
operate on QV4::Function objects for binding profiling.
Change-Id: Ic7ce83c487ceb69cad4b16e3dab42026238b7e82
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: Ie490f113b6fc48ea75eb5903a79dddb02faa7301
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
And remove it from the derived QQmlBoundSignalExpression
class.
Change-Id: I93cdc67136ddd916474acd2169faf380e296a900
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |\
| | |
| | |
| | | |
Change-Id: I19804e880005c66880eeabfaebf0b1093de80e6b
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fixes a use after free valgrind error (and thus a potential
crash) in tst_qqmljavascript::selfDeletingBinding that got
introduced with change e7f28bd13b18cfcb36ef41804029b9b296117002
Change-Id: Ia6b69af199c0f2af1cc0d33d4f13a8593b2c6d51
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: Ibcd277bc434638e5c6e8e9ccea634aa25cde1643
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
The class should get merged with the QV4::QmlContext class.
Simplify the cleanup by moving both classes into a common
file.
Change-Id: I0074da79701d5f41eb51681b70fcde85bfd45fc1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/qml/jsruntime/qv4variantobject.cpp
src/qml/types/qquickworkerscript.cpp
src/quick/scenegraph/util/qsgdefaultpainternode_p.h
tools/qmljs/qmljs.cpp
Change-Id: I876242714ec8c046238d8fd673a5ace2455b2b59
|
| |
| |
| |
| |
| |
| |
| | |
So now VariantObject is nearly a trivial struct.
Change-Id: Ifc54c04d9686c03e12066c5287823dd3b1315d2a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|/
|
|
|
|
|
| |
These methods do not modify objects.
Change-Id: I67b1a10cfd0b32688500fca3265a96f53afd1b57
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
| |
Esp. when disabling notifications and marking notifiers as "done".
Change-Id: I2d1c3bf048b32f68680744250e4250c3c4d76660
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: I70a080feb401cf23aef1bde44a19a11e27642f30
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
| |
Remove the QQmlBinding *binding argument as it is always the this
pointer.
Change-Id: I76ccf64a1d37ce32089c81f60466dce79b9fa5bf
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
| |
And add accessors. This makes it easier later on to change the storage
of the fields.
Change-Id: I21163668ac83a7d52f398981baf3c27ef161c177
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Use QStringBuilder more.
Use QString::asprintf instead of arg()'s chain.
Use += operator to reserve extra capacity for
possible free following append/prepend/+= call.
Change-Id: Ib65398b91566994339d2c4bbfaf94e49806b7471
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
| |
Change-Id: I2ae2fb0f18af9b866cc9482fd4f42d9d4269f8cb
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
| |
[ChangeLog][QtQml][Important Behavior Changes] A JS null value converted
to a QVariant now has type QMetaType::Nullptr rather than
QMetaType::VoidStar.
Change-Id: I91a64e444ada0f1884fe807f9973348ba1a878ff
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
| |
This will make it easier in follow-up patches to add or remove flags. It
also shrinks the flags, because each type doesn't need its own bit (as
those are mutually exclusive).
Change-Id: I5ba6de5f330eb20c82aa16b4467ed6c952725979
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
| |
This helps in making it clear when an index is a plain old number and
when it consists of an encoded value type index.
Change-Id: Ic50d95caf244ed0ee2d62bdba53910a371cfee04
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
| |
In it we can cache the meta-type for the specific QObject subclass of
the property type. This reduces the number of calls to QMetaType.
Change-Id: Ie3774395c971bc33af58a8290453b19631939ea8
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
| |
Pass property reads/writes through utility functions in QQmlProperty,
which in turn will try to use accessors when available (and no
interceptors have to be called).
Change-Id: I60ecfc202b6024bfe4a33206a46299787b152546
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
The bit indicating if accessors could be used only returned true when an
interceptor was added to the object, but the property in question was
not intercepted. So it missed the case where no interceptor was
installed on any property of the object.
Change-Id: I355eb7bbe232f512d02c1b9783a0e6f990552689
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Same idea as the read accessors, but with a slight difference: the
property setters do emit signals, so we can't do a direct property write
and have to call the setter. However, it does circumvent the meta-calls.
There is one gotcha: if a property is intercepted (e.g. by a Behavior),
we still have to do the meta-call in order to dispatch the write to the
interceptor.
According to valgrind, this saves 138 instructions on x86 for every
"accessible" property write.
Change-Id: I07dbac95613415559ffa1691734a5af7c84721fc
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
When we can determine the type of a target property during type
compilation, we can skip a whole bunch of code that deals with
converting the result of a binding to the correct (target) type.
This removes 65 instructions on x86 for such typed bindings.
Change-Id: Id2c7c57b9ae6dfbeb921121beae9630604ca1d17
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The implementation of many (or all) runtime functions consist of first
creating a QV4::Scope, which saves and restores the JS stack pointer.
It also prevents tail-calls because of that restoring behavior. In many
cases it suffices to do that at the entry-point of the runtime.
The return value of a JS function call is now also stored in the scope.
Previously, all return values were stored in a ScopedValue, got loaded
on return, and immediately stored in another ScopedValue in the caller.
This resulted in a lot of stores, where now there is only one store
needed, and no extra ScopedValue for every function.
Change-Id: I13d80fc0ce72c5702ef1536d41d12f710c5914fa
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
| |
QQmlCompiledData used to contain the binary data for instantiating QML types in
the QML VME. Nowadays the QML type compiler as well as the JavaScript compiler
create a QV4::CompiledData::CompilationUnit.
Change-Id: I155f62a5ecfb55a3fe230520231b6d8fd5b28ac9
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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: Ic68691639e81a8450311c03e86bcde14e7bd7dd4
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>
|
|
|
|
|
|
|
|
|
| |
It's now QV4::FunctionObject::createQmlFunction, which I
believe is a better place and name for the method, esp.
as it has no real connnection to the binding wrapper anymore.
Change-Id: I59e20e120db72e53735b3a986e0b91bc7c3347d7
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/qml/debugger/qv4debugservice.cpp
src/qml/jsruntime/qv4value_inl_p.h
src/qml/jsruntime/qv4value_p.h
src/qml/memory/qv4mm.cpp
src/qml/memory/qv4mm_p.h
src/qml/qml/qqmlnotifier_p.h
src/qml/qml/qqmlproperty.cpp
src/quick/items/qquickflickable.cpp
src/quick/items/qquicktextedit.cpp
tests/auto/quick/qquickwindow/BLACKLIST
The extra changes in qqmlbinding.cpp are ported from changes to
qqmlproperty.cpp that occurred in parallel with writeBinding() being
moved to qqmlbinding.cpp.
Change-Id: I16d1920abf448c29a01822256f52153651a56356
|
| |
| |
| |
| |
| |
| |
| |
| | |
The same check is done ~3 lines above.
Change-Id: I8e6aeff89a7b0f3805afdf453b133dc98da59066
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| | |
Clean up some of the code to create binding expressions.
Change-Id: I1cd826685713b44166c58b114fa91135a664591d
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
| |
| |
| |
| |
| | |
Change-Id: I3ca148ae021ffc349b943231cc749828b0b7816c
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Fold the isAddedToObject flag into the nextBinding pointer.
Reorder the members to avoid holes in the data.
Change-Id: I0a216940f52020a5d48a6ed05cc236c248161b08
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>
|
| |
| |
| |
| |
| |
| |
| |
| | |
It's only called from there; this simplifies the code and will allow
some further optimizations.
Change-Id: I1f0befe620beaa0bbf961fc829881ef7b5c2e435
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When looping to resolve nested aliases, make sure we use the
correct property index to determine the vme meta object that
contains the next level of alias data.
Change-Id: Id2077b164a4591c86ccb63e8ed3bb997d719731c
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This unifies some more code between the different binding
classes
Change-Id: I891dc9358cf9598a0c1e21df8a62d6f8a4193985
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|