| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
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>
|
|\
| |
| |
| |
| |
| | |
Conflicts:
src/qml/qml/qqmlobjectcreator_p.h
Change-Id: I60858ddb46866a8fa1a8576bb05b412afeeb4e41
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In the reported bug, it can happen that we try to access the compile-time resolved
QObject property of an object that is referenced by id. The binding that uses this is
triggered when the property changes but _also_ when the id referenced object gets either
created or deleted. The first time the binding is evaluated is very early on, when the
id referenced object is not created yet, so the binding evaluation fails. However the
dependency is set up, and so later then the id referenced object is created and the id
property is set on the context, the notification triggers and the binding is re-evaluated.
During that binding evaluation a QObject property access happens by index on an object that
doesn't have its VME meta-object set up yet. Therefore the property access fails and a
crash occurs or the Q_ASSERT(property) assertion fails.
The fix is to set register the id named object in the context _after_ the VME meta-object is
setup.
Task-number: QTBUG-40018
Change-Id: Ic2d7b4a0c49635efe68e93f2f6c316eb65f0c309
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Renamed LICENSE.LGPL to LICENSE.LGPLv21
- Added LICENSE.LGPLv3 & LICENSE.GPLv2
- Removed LICENSE.GPL
Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Merge QV4::CompiledData::QmlUnit into QV4::CompiledData::Unit. For pure JS
units it means a slight increase of memory usage by a few bytes, but overall it
makes the code a lot simpler.
Change-Id: Ib48927749720b056f004aac0fe22cb8ec729e3f6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|\|
| |
| |
| | |
Change-Id: Id95f7b01de36bccecbb7b73acc041654a1fe2ebe
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
instantiation
It may happen that during the lengthy process of instantiating a tree of
objects for QML, the garbage collector runs.
For objects created by QML we support different ownership models, for example
in QtQuick visual parents keep their visual children alive, despite perhaps a
lack of QObject parentship. That ownership becomes active once the QML
autoparent function has assigned the correct visual parent, which happens after
object instantiation (after QQmlObjectCreator).
Similarly when a composite type is created, its QObject parent is only set
after all properties have been set. The root QObject is kept alive through a
special boolean, but if the sub-objects aren't children yet, their JS wrapper
might get deleted. For composite types with var properties, that also means
their var properties get deleted, such as the model property of TableView.qml
in the bug report.
In the future we want to support creating QWidget hierarchies with QML, which
also for layouts may rely on a delayed parent assignment for layouts.
To accommodate all this, this patch introduces an array on the JS stack that
keeps track of all JS wrappers for all QObjects created. This array is alive
during object tree creation. Afterwards, the different ownership models take
over, for example the auto parent function assigning a visual parent.
This patch also fixes an off-by-one in the total object count calculation
for composite types, where when instantiating a composite type as a sub-object
we counted the sub composite's object count but forgot the object itself.
Task-number: QTBUG-38835
Task-number: QTBUG-39966
Change-Id: I6104b2434510642081e0c54793ed296adeca7481
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Instead of allocating the data directly, centralize the object and its ::Data
allocation in one place in the memory manager. This is in preparation for
additional pointer indirection later.
Change-Id: I7880e1e7354b3258b6a8965be378cd09c9467d25
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
| |
| |
| |
| |
| | |
Change-Id: Ic248aef22e1222e84dfb9b8af0413cf750beb576
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
.qmake.conf
examples/quick/scenegraph/openglunderqml/squircle.h
src/quick/doc/src/qmltypereference.qdoc
src/quick/scenegraph/qsgthreadedrenderloop.cpp
Change-Id: Ife4f4b897044a7ffcd0710493c6aed1d87cf1ef9
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is a regression introduced with Qt 5.3.0. The recursion watcher code that
is supposed to handle the test case of QTBUG-39775 can detect the recursion
into the object creator. However the boolean that indicates the recursion is a
member of a structure that's deleted afterwards. To avoid access to deleted
memory, this patch simply reference counts data structure shared between the
creators and also wraps the recursion watcher into a convenience class that
also increases/decreases the reference count accordingly.
Change-Id: I8d2e3e200ab1295e89d951e09f187d382a056d5a
Task-number: QTBUG-39775
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes crash when delegate is being deleted while not totally instantiated
Valgrind trace:
==15748== Invalid write of size 8
==15748== at 0x57A02DB: QQmlComponentAttached::~QQmlComponentAttached() (qqmlcomponent.cpp:985)
==15748== by 0x57A0318: QQmlComponentAttached::~QQmlComponentAttached() (qqmlcomponent.cpp:989)
==15748== by 0x668736B: QObjectPrivate::deleteChildren() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748== by 0x66900EB: QObject::~QObject() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748== by 0x5D1D4B5: QQuickItem::~QQuickItem() (qquickitem.cpp:2064)
==15748== by 0x5D33AE5: QQmlPrivate::QQmlElement<QQuickItem>::~QQmlElement() (qqmlprivate.h:106)
==15748== by 0x668736B: QObjectPrivate::deleteChildren() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748== by 0x66900EB: QObject::~QObject() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748== by 0x5D1D4B5: QQuickItem::~QQuickItem() (qquickitem.cpp:2064)
==15748== by 0x5D34655: QQmlPrivate::QQmlElement<QQuickLoader>::~QQmlElement() (qqmlprivate.h:106)
==15748== by 0x668736B: QObjectPrivate::deleteChildren() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748== by 0x66900EB: QObject::~QObject() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748== by 0x5D1D4B5: QQuickItem::~QQuickItem() (qquickitem.cpp:2064)
==15748== by 0x5D33AE5: QQmlPrivate::QQmlElement<QQuickItem>::~QQmlElement() (qqmlprivate.h:106)
==15748== by 0x668736B: QObjectPrivate::deleteChildren() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748== by 0x66900EB: QObject::~QObject() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748== by 0x5D1D4B5: QQuickItem::~QQuickItem() (qquickitem.cpp:2064)
==15748== by 0x5D348A5: QQmlPrivate::QQmlElement<QQuickFocusScope>::~QQmlElement() (qqmlprivate.h:106)
==15748== by 0x668736B: QObjectPrivate::deleteChildren() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748== by 0x66900EB: QObject::~QObject() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748== by 0x5D1D4B5: QQuickItem::~QQuickItem() (qquickitem.cpp:2064)
==15748== by 0x5D34655: QQmlPrivate::QQmlElement<QQuickLoader>::~QQmlElement() (qqmlprivate.h:106)
==15748== by 0x668736B: QObjectPrivate::deleteChildren() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748== by 0x66900EB: QObject::~QObject() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748== by 0x5D1D4B5: QQuickItem::~QQuickItem() (qquickitem.cpp:2064)
==15748== by 0x5D33AE5: QQmlPrivate::QQmlElement<QQuickItem>::~QQmlElement() (qqmlprivate.h:106)
==15748== by 0x6689607: QObject::event(QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748== by 0x5D1B012: QQuickItem::event(QEvent*) (qquickitem.cpp:7114)
==15748== by 0x6659CDC: QCoreApplication::notify(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748== by 0x66599D4: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748== by 0x665B826: QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748== by 0x66B1242: ??? (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748== by 0x8EE2E43: g_main_context_dispatch (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4100.0)
==15748== by 0x8EE3087: g_main_context_iterate.isra.24 (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4100.0)
==15748== by 0x8EE312B: g_main_context_iteration (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4100.0)
==15748== by 0x66B06BB: QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748== by 0x66578EA: QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748== by 0x665EF45: QCoreApplication::exec() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748== by 0x40711B: startShell(int, char const**, void*) (main.cpp:171)
==15748== by 0x407A74: main (main.cpp:227)
==15748== Address 0x1be83870 is 64 bytes inside a block of size 112 free'd
==15748== at 0x4C2C2BC: operator delete(void*) (vg_replace_malloc.c:503)
==15748== by 0x5815FB0: QQmlObjectCreator::~QQmlObjectCreator() (qqmlobjectcreator.cpp:156)
==15748== by 0x57A52AA: QQmlIncubatorPrivate::clear() (qscopedpointer.h:62)
==15748== by 0x57A53C6: QQmlIncubator::clear() (qqmlincubator.cpp:577)
==15748== by 0x5DCEA20: QQuickLoader::setActive(bool) (qquickloader.cpp:350)
==15748== by 0x5DCF6D2: QQuickLoader::qt_metacall(QMetaObject::Call, int, void**) (moc_qquickloader_p.cpp:277)
==15748== by 0x579DC66: QQmlPropertyPrivate::write(QObject*, QQmlPropertyData const&, QVariant const&, QQmlContextData*, QFlags<QQmlPropertyPrivate::WriteFlag>) (qqmlproperty.cpp:1322)
==15748== by 0x579E76E: QQmlPropertyPrivate::writeValueProperty(QObject*, QQmlPropertyData const&, QVariant const&, QQmlContextData*, QFlags<QQmlPropertyPrivate::WriteFlag>) (qqmlproperty.cpp:1246)
==15748== by 0x579F2F9: QQmlPropertyPrivate::writeBinding(QObject*, QQmlPropertyData const&, QQmlContextData*, QQmlJavaScriptExpression*, QV4::ValueRef, bool, QFlags<QQmlPropertyPrivate::WriteFlag>) (qqmlproperty.cpp:1578)
==15748== by 0x580CF69: QQmlBinding::update(QFlags<QQmlPropertyPrivate::WriteFlag>) (qqmlbinding.cpp:266)
==15748== by 0x580D5BD: QQmlBinding::expressionChanged(QQmlJavaScriptExpression*) (qqmlbinding_p.h:105)
==15748== by 0x57E6156: QQmlNotifier::emitNotify(QQmlNotifierEndpoint*, void**) (qqmlnotifier.cpp:81)
==15748== by 0x57E6130: QQmlNotifier::emitNotify(QQmlNotifierEndpoint*, void**) (qqmlnotifier.cpp:76)
==15748== by 0x57E6130: QQmlNotifier::emitNotify(QQmlNotifierEndpoint*, void**) (qqmlnotifier.cpp:76)
==15748== by 0x5788FA3: QQmlData::signalEmitted(QAbstractDeclarativeData*, QObject*, int, void**) (qqmlengine.cpp:721)
==15748== by 0x6688232: QMetaObject::activate(QObject*, int, int, void**) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748== by 0x57882A7: QQmlData::destroyed(QObject*) (qqmlengine.cpp:1658)
==15748== by 0x668FD7D: QObject::~QObject() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748== by 0x55E8B64: QQmlDMAbstractItemModelData::~QQmlDMAbstractItemModelData() (qqmladaptormodel.cpp:95)
==15748== by 0x58643DC: QQmlDelegateModelPrivate::release(QObject*) (qqmldelegatemodel.cpp:520)
==15748== by 0x586440C: QQmlDelegateModel::release(QObject*) (qqmldelegatemodel.cpp:536)
==15748== by 0x5DFED4F: QQuickItemViewPrivate::releaseItem(FxViewItem*) (qquickitemview.cpp:2349)
==15748== by 0x5DBAB94: QQuickGridViewPrivate::addVisibleItems(double, double, double, double, bool) (qquickgridview.cpp:497)
==15748== by 0x5DFC94E: QQuickItemViewPrivate::refill(double, double) (qquickitemview.cpp:1751)
==15748== by 0x5DFF26A: QQuickItemViewPrivate::layout() (qquickitemview.cpp:1859)
==15748== by 0x5D275F7: QQuickWindowPrivate::polishItems() (qquickwindow.cpp:271)
==15748== by 0x5D02B7D: QSGThreadedRenderLoop::polishAndSync(QSGThreadedRenderLoop::Window*) (qsgthreadedrenderloop.cpp:1150)
==15748== by 0x5D03167: QSGThreadedRenderLoop::event(QEvent*) (qsgthreadedrenderloop.cpp:1235)
==15748== by 0x6659CDC: QCoreApplication::notify(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748== by 0x66599D4: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748== by 0x66B00CC: QTimerInfoList::activateTimers() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748== by 0x66B03F0: ??? (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748== by 0x8EE2E43: g_main_context_dispatch (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4100.0)
==15748== by 0x8EE3087: g_main_context_iterate.isra.24 (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4100.0)
==15748== by 0x8EE312B: g_main_context_iteration (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4100.0)
==15748== by 0x66B06BB: QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748== by 0x66578EA: QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748== by 0x665EF45: QCoreApplication::exec() (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.3.0)
==15748== by 0x40711B: startShell(int, char const**, void*) (main.cpp:171)
==15748== by 0x407A74: main (main.cpp:227)
Change-Id: I2c7d38fa5a2566520173bff7ad4e5f9c966d083e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This is part of the effor of moving members from QQmlCompiledData into
QV4::CompilationUnit in order to eliminate the former in the long run.
Change-Id: Icce7fe0ee9a49cb3a7677fd7020008fc55ecdcf6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The merge conflict is about the removal of "d1" from the register
set on ARM, but that was already done in dev in commit ddb33ee9ba9e1344caa9be5dbf4b534c3ede692e
The change in src/quick/scenegraph/coreapi/qsgrenderer.cpp with commit 2414f1675eab163b22dcc4e8ded80ed04d06369b
was reverted to what it was before, per Laszlo's advice.
Conflicts:
src/qml/jit/qv4isel_masm.cpp
Change-Id: I7bce546c5cdee01e37853a476d82279d4e72948b
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This isn't very useful QML, but the following was "legal" in 5.1:
property int id:
id: foo
The integer property was not set, but the object's name (id) was still set.
With 5.3 this causes a failing assertion, which shouldn't happen. We should
do the same thing as the old code in QQmlComponent::buildProperty did for
id properties: Set them only if they're of string type.
Task-number: QTBUG-38463
Change-Id: I0da58557fbfb0944f53127e0ee77117ac33ce250
Reviewed-by: Tasuku Suzuki <stasuku@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The custom parser design used to be so that the custom parser operates on the "AST",
creates its own binary representation of the data it needs, stores it in a QByteArray
and gets that at object instantiation time. That meant serializing everything necessary.
With the introduction of the "binary" QML data structure, that process of serialization
becomes obsolete and would require extra work in the custom parsers for example for QQuickStates
to store the translation parameters.
The clean solution is to eliminate this unnecessary serialization process and
instead let the custom parsers do a verification pass at type compile time and
then simply operate directly on the QV4::CompiledData::Bindings at object
instantiation time. That simplifies the code, and allows for support of
translations throughout all list model properties.
Additionally this speeds up the creation of state objects and reduces memory
consumption. Previously a text: qsTr("foo") binding in states would result in
an actual java script binding. After this patch it is merely stored as a string
and translated at object instantiation time.
Change-Id: I7550274513f54abb09a0ab4de51c4c0bcdb23cae
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now that object creation is done in nested function calls we can
use an RAII-type profiler to trace it. This makes the profiling
much simpler and more robust.
Also, the stack of profiling data in the VME profiler has to match
the stack of completion callbacks in the VME, so the push and pop
operations are synchronized now.
Task-number: QTBUG-37978
Change-Id: I1bc5e0665b88e5b3772e48c8676cdda3fae59e1b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
Connection objects
We can re-use the expression we've compiled at QML type compilation time, as
long as we "inject" the signal parameters in the dynamic qml lookup chain.
Change-Id: Icc417531c41dea06ff5d033011179af49b03f542
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The right hand side of script string properties can be evaluated in entirely
dynamic scopes, due to QQmlExpressions' public API of allowing construction
from a QQmlScriptString and a variable scope/context. Nevertheless we should
compile these bindings at type compile time, as long as we make sure that the
compiled code doesn't try to do any compile time determined property lookups
and type resolution. This is implemented using a separate compilation pass
that ensures the disableAcceleratedLookups flag is set.
A few minor cleanups come with this patch:
* Ensure that the property caches array is always symmetric to the list of
compiled QML objects, as that allows the use of at() instead of value().
* The code for creating a QML callable function object for a given run-time
function is now centralized in a static function QmlBindingWrapper, used
for script strings and bindings from custom parsers.
The provided unit test verifies the successful execution of the same script
string with two different scope objects.
Change-Id: Ica2cea46dd9e47263b4d494d922d3cc9664b08ae
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
| |
creatScriptFunction -> createScriptFunction
Change-Id: Icdb9214b1ae067fa2b8693d50cdac0be9fe6d390
Reviewed-by: Michael Brasser <michael.brasser@live.com>
|
|
|
|
|
|
|
|
|
|
| |
This showed up in the profiles again: In QML we create a lot of objects
with many children and sending a child event each time is expensive. That's
why the VME didn't do that and hadn't done so in ages. This patch restores
that behavior and aspect of loading performance.
Change-Id: I5078fe330d913dc832b284aaecf031152dc80802
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
| |
* Get rid of members in QQmlCompiledData that were used by the VME
and are now unused
* Get rid of QQmlVME friend declarations that are not needed anymore
Change-Id: I11b4b6f0b4b0b60edf92a1256be3d0d44d76bbc9
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
| |
Move the QML IR types into the QmlIR namespace and clean them up.
Change-Id: I2125449e5a519034e23670651efa620f405730b4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
dependencies
During lazy binding initialization we may execute bindings where we calculated
dependencies to the context object at compile time. In order to register those
dependencies, the contet object needs to be set in the QQmlContextData.
This patch makes sure to set it before setting up the bindings.
Change-Id: Iacd360140cd9c389487bda82f6a7e6cc3a44c154
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
When populating deferred properties, we must not set the rootObjectInCreation
flags on the root context and (consequently) on any sub-objects objects created
when initializing deferred properties. Doing so otherwise will end up us
incorrectly linking QQmlContextData together, causing QQmlData::linkedContext
to point to iself and crash on exit upon deletion.
Task-number: QTBUG-37484
Change-Id: Ia5dc92a04e0f66499f15fbac10f14859d387b021
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
object
Because QQmlObjectCreator::populateInstance would take the property cache to
install from the outside and also pass it as the cache to use for the VME meta
object to install, it could happen that the wrong cache was installed - the one
supplied by engine->cache(propType) instead of the cache created together with
the VME meta-object at type compilation time.
This patch ensures that they're always in sync and correct by removing the
responsibility of the caller to supply the cache to use and install. Instead
the function will always use the cache calculated at type compile time (and
also use that when installing the VME meta object).
Installation of the property cache on the declarative data of the instance is
now done only at createInstance() time, which fortunately also simplifies the
code.
Change-Id: Ia722cd57bc48007aaf725f1f59daa2f21569e324
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
| |
This reduces the size of QQmlBinding by 12 bytes.
Task-number: QTBUG-37134
Change-Id: Id55257edec8cee88d863374e8a96d7eebbeaf523
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Michael Brasser <michael.brasser@live.com>
|
|
|
|
|
|
|
|
|
|
| |
Simple calls to qsTr and qsTrId are detected at type compile time and
reduced to a special Translation and TranslationById binding type, which
avoids allocating a QML binding at type instantiation type just to perform
a translation.
Change-Id: I61e4f2db2a8092b5e6870e174b832d9c20cd62b5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
When initializing bindings on group objects, we would accidentally set the
property cache for the property type instead of preserving a possibly earlier
initialized cache on the ddata of the QObject.
Task-number: QTBUG-37390
Change-Id: I4d6a4ce6b3382f378f9a9ddfe11924860a15979d
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|