| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/qml/compiler/qv4compileddata.cpp
src/qml/compiler/qv4compileddata_p.h
src/qml/jsruntime/qv4engine.cpp
src/qml/jsruntime/qv4qmlcontext.cpp
src/qml/jsruntime/qv4qmlcontext_p.h
src/qml/jsruntime/qv4regexpobject.cpp
src/qml/jsruntime/qv4regexpobject_p.h
src/qml/types/qqmllistmodel.cpp
src/quick/items/qquickanimatedimage_p.h
src/quick/scenegraph/qsgrenderloop.cpp
tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp
Change-Id: If20ef62b2c98bdf656cb2f5d27b1897b754d3dc0
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In commit 48c09a85ce397979c7e706e3694c879ffe456e09 we added the
undeletableTypes container to hold a reference on C++ registered types
to keep the indices returned by the public qmlRegisterType() API stable.
Since qmlClearTypeRegistrations() is API that also resets those indices,
we must also clear the undeletableTypes container to avoid leaking
memory.
Change-Id: I2038c00913f894d58aca3714d64d497493585326
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When falling back to the QObjectWrapper it will add in the extra parts
added when the roles were added to the object created by the model to
hold the data being returned. This was causing the last entry to be
duplicated and causing extra work too.
Task-number: QTBUG-54285
Task-number: QTBUG-62156
Change-Id: I2907477277df8d16db4491a4999f004433e4205c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Detaching delegate instances from model items is done after the
destruction of said model items. The problem is that after the model
item is destroyed, it will emit a change/destroyed signal. As the
delegate is still referencing the item, this will result in a
use-after-free. To provent that, the items are kept around until after
everyone (notably the delegate model) has been notified of the removal.
[ChangeLog][Qt][Qml] Fix possible use-after-free when removing items from a ListModel through JavaScript.
Task-number: QTBUG-59256
Change-Id: Iee182e2cf0b50d3dda2181fed95e38f1a60f22a9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When a qml file uses a qml singleton, we need to reliably detect when
the singleton changes and re-generate the cache of the qml file using
it. This is a scenario covered and fixed by commit
5b94de09cc738837d1539e28b3c0dccd17c18d29, with the exception that
currently QML singletons registered via qmlRegisterSingleton were not
added to the list of dependent singletons for a qml file. We can fix
this by extending findCompositeSingletons() to also cover the singletons
that do not originate from a qmldir file.
[ChangeLog][Qt][Qml] Fixed bug where sometimes changes to a qml
singleton would not propagate to the users or cause crashes.
Task-number: QTBUG-62243
Change-Id: I16c3d9ba65fd82e898a29b946c341907751135a9
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Disambiguate the QV4::Value parameter.
Task-number: QTBUG-63135
Change-Id: Iae6bd209876336d58256aa94f89d146cadc62f08
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
On some platforms, math functions in the std namespace don't work even
if cmath is included.
Change-Id: Ia71d22b07f508e0584de5320f376fbf4b3a2887b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
ebda8170a removed a member. Thanks to the padding, the size of the
structure remained the same on 64-bit, but not on 32-bit. Removing
the padding gives now the same size on both.
Task-number: QTBUG-63109
Change-Id: If87ad21a1c94e63643b0cd52f95e244364f6e73d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This avoids overflows in the markStack for test cases where
we have a huge amount of compilation units with many runtime
strings that all want to get marked.
Task-number: QTBUG-63063
Change-Id: I150c1f1a4065350cec59dd80c5c628920f70e3d0
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Accoding to the standard the regexp objects created by literals should
be separate objects as if calling new. We were violating that by caching
the same object for every instance of a literal.
This also fixes a problem with leaking values of lastIndex between
separate instances of the same global regexp literal.
Task-number: QTBUG-62175
Change-Id: Ib22e9ee68de1d1209fbd4212e72f576bc059d245
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
As a follow-up commit to 48c09a85, avoid the use of key() to create a
temporary string when cleaning the QML type registry. There is strictly
speaking no need to perform another hash lookup anyway.
Change-Id: Ibd5f0210d5584d1f847d8ec61f25cb0972076365
Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This is a follow-up to the parent commit to remove the variable that
is really a constant (zero).
Change-Id: I8fc20027c5c7b871269b814cb8b93636e94be267
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If a .qml file starts with Component {} and its item(s) define their own
properties, alias, etc. then loading this file initially would work, but
loading it from a cache file would crash with dangling pointers in the
property cache. This was due to us registering aliases, properties, etc.
twice in the property cache, exceeding the reservation in the property
cache vectors.
The minimal fix is to skip the root object in the property cache
creating loop as we do handle it separately afterwards. It needs to be
separate because the first object index within the component does not
stem from a binding.
However as the root object index is always zero, I'll make a follow-up
patch to get rid of of the variable.
Task-number: QTBUG-62263
Change-Id: I86b76d38cb490750a561eac2b0ad6fff6ef2e20a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is a regression introduced by commit
e22b624d9ab1f36021adb9cdbfa9b37054282bb8, where the object that owns the
QML context would destroy the context upon struction. Now the context
may live longer and thus the context->contextObject pointer would become
a dangling pointer.
Task-number: QTBUG-63078
Change-Id: I8fdab4086b0472d5d4930cf57aa76922b7ed9e2e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When upgrading from one Qt snapshot to another, we may not end up
bumping the Qt version. However we do need to re-generate QML cache
files. Therefore let's encode the commit hash of declarative in the
checksums.
Task-number: QTBUG-62302
Change-Id: Ia597fcbe05ea2d32664da2572a1b35c624490095
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
|
| |
| |
| |
| |
| |
| |
| | |
This code was moved to QQmlDeferredBindingScanner in f27d058.
Change-Id: I8cf261c497ec433a14e00e17b67a284b45cf8d75
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This allows us to fix QTBUG-50992 - the issue with most votes in QQC2.
Task-number: QTBUG-63036
Change-Id: I996cd1128582b80e0c8480ae143d682c1e8eb8fe
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When closures created inside QML components are called after the
surrounding component (and consequently QML context) has been destroyed,
we are in a somewhat limited environment. Initially we would just crash
as the calling QML context is not valid anymore. We can alleviate that
by introducing reference counting on the context and letting the QML
context wrapper keep a strong reference. This avoids the crashes and
also ensures that at least imports continue to be accessible within
these contexts (as the singleton test case demonstrates).
Task-number: QTBUG-61781
Change-Id: I893f171842d01b0863d95a02ea738adc2620e236
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| |
| |
| | |
This way we don't have to manually initialize and delete them.
Change-Id: I0104c744dba380e957271d0924498e3643856e9e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In order to support compilers that do not support the packing attribute,
replace the use of the pack macros with static assertions about the
structure size, to ensure that what is generated by host tools
(qmlcachegen, qqc) is compatible with what's loaded by the target at
run-time. This requires padding and re-ordering some structures.
Task-number: QTBUG-61468
Change-Id: I3d82457f086a9b066d1c6df4c46d9f154dd5f208
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We have to make sure all profiler calls to one adapter are done from the
same thread.
It turns out that all the calls from QQmlTypeLoader are done from the
type loader thread. By using a separate adapter for that, we avoid any
extra locking.
Task-number: QTBUG-62987
Change-Id: I5cffcc30b84dd4154daa0c56312a1141ce2033e1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This corrects the encoding of QML2_IMPORT_PATH environment variable,
since it contains paths. For the other cases, it's just improving the
code.
Task-number: QTBUG-62328
Change-Id: I0f2ce894387048f78465ffff141ca50208f6845a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Most, if not all, QML tests are written without any sort of dynamic
instantiation of the test data, so doing view.setSource() will evaluate
the whole source file, compute bindings, create items, windows, etc.
This is less then ideal when all you want is to list the test functions
using -functions, or when running a single test from the command line,
as in both cases we'll still actually evaluate every single QML file.
This makes it really hard to evaluate test output, e.g. from the CI,
especially with logging enabled, as even if a single test is requested,
the logs are filled with results from the loading of the other tests.
To improve the situation we use a non-instantiated QML component that
we then inspect its compilation data, looking for test cases and
functions.
In the future the implementation of TestCase's qtest_run* machinery
should be built on top of QTestLib instead of being reimplemented in
JavaScript, but this is left for later.
Change-Id: Ie5448208daf786e335583ab6bdfbc195891ec1f5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This avoids overflows in the markStack for test cases where
we have a huge amount of compilation units with many runtime
strings that all want to get marked.
Task-number: QTBUG-63063
Change-Id: I7c1df0fdb9afada1830f8c218a0e52ebcd093850
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
|
| |
| |
| |
| |
| |
| |
| | |
Reported by ASan.
Change-Id: I8e5e6561e6e721ba7fe37a4658480d14b8c437ae
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I884e6c747af6dfffce23fa21fc320be53951a7d4
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|\|
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/quick/items/qquickwindow.cpp
src/quick/scenegraph/qsgrenderloop.cpp
Change-Id: Idd7106995b5545fcac869e9056a365ef9edb36ca
|
| |
| |
| |
| |
| |
| |
| |
| | |
...and fix some section titles to be less confusing.
Change-Id: If83c3faffead9e2e9be7fc0fb360f1c5b8b1bb51
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
There hasn't been a need to copy the data since some time,
as we are not patching the bytecode anymore.
Change-Id: I2303d5a2fceb611933905311aaedb041a78c42ac
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I89da2d258d6e5663d45497bd4b7fa105a11e46e7
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
|
|\|
| |
| |
| |
| |
| |
| | |
Conflicts:
tests/auto/qml/debugger/qqmlenginedebuginspectorintegrationtest/tst_qqmlenginedebuginspectorintegration.cpp
Change-Id: I31375151eb239f348bec988d2d0506c2b4d9604c
|
| |
| |
| |
| |
| | |
Change-Id: I5bd236f0a38a8a83eddef7d2239b17ae7be2239a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When creating a composite type, we register the meta-type in the qml
loader thread. However we would require linking of the compilation unit
to the QML/engine thread before we would be able to also undo that
registration in unlink(), because we require the engine member to be
set. If that did not happen, i.e. a qml type was loaded and trimmed from
the cache before it was ever linked, we would end up with a dangling
pointer in m_compositeTypes.
Let's handle the case of CompilationUnit referring to a QML composite
type separately from it being a compilation unit resulting from a .js
file or in a plain QJSEngine environment.
Task-number: QTBUG-62630
Change-Id: Ia68cc46f05345702bd9ba0378f61118f1964d141
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: Ifb111ceab64244965569f59eda8d9604131d209d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I1f39c488f5a7b7f1a10fa94461c308f0cde5fcd5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I0c4f5d908215b9b6fac0fadb352f7c36849dce6f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Don't use void * in our internals, when we can simply pass
a typed pointer.
Change-Id: Id02033c7e66df7e041c079d3546f9dd6027ef8d5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
findAliasTarget() in binding() can result in an invalid index. We do
check for valueTypeIndex below, so we should also check for coreIndex.
Change-Id: I8cfed237666f8c1f8733592d3abd9be5ccee3229
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: Icd0e0d4b27cb4e5eb892fffd14b5285d43f4afbf
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Do not only reevaluate the expressions of the first child, but of all
child contexts.
Task-number: QTBUG-15602
Change-Id: Ieacc441f14f7a26793bfcdc2206030a78d2d429c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Forward port commit b04b7d340f39dfdde560b1303ea6a8c8ace8056e to do the
initialization in the original file, not in the generated one.
Change-Id: I070d9668c75be20c014835514db49d1a6518d590
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Michael Brasser <michael.brasser@live.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Allow declarations such as:
enum MyEnum {
Value1 = 1,
Value2
}
Not all features of C++ enums are supported. Specifically, we don't yet
allow:
* Negative numbers (Value1 = -1)
* Assignment of other values (Value2 = Value1)
Change-Id: I4776f8d86bd0c8688c7dd8b7d4ccb2f72fdfe721
Task-number: QTBUG-14861
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/qml/compiler/qqmltypecompiler.cpp
src/qml/jsruntime/qv4qmlcontext.cpp
src/qml/jsruntime/qv4qobjectwrapper.cpp
src/qml/qml/qqmlcustomparser.cpp
src/qml/qml/qqmlimport.cpp
src/qml/qml/qqmlimport_p.h
src/qml/qml/qqmlmetatype.cpp
src/qml/qml/qqmlmetatype_p.h
src/qml/qml/qqmltypenamecache.cpp
src/qml/qml/qqmltypenamecache_p.h
src/qml/qml/qqmltypewrapper.cpp
src/qml/qml/qqmltypewrapper_p.h
src/qml/qml/qqmlvmemetaobject.cpp
src/qml/util/qqmladaptormodel.cpp
Change-Id: Ic959d03e6f9c328fb02710d9abbb0f27cddde131
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Allocate the strings in the compilation unit as regular strings, not as
identifiers. We mark the runtimeStrings in the compilation unit, so when
the unit is released as part of component cache trimming, those strings
can also be collected. The JS object literal class keys have to remain
identifiers though.
However this is just a stop-gap as the real problem is that the
identifier table can be triggered to grow without bounds.
Task-number: QTBUG-61536
Change-Id: I7a2854b7fa9c9953348b5e34a31833f7be67cfbf
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When looking up QML properties in the property cache, we also need to
verify that they should be visible in the QML context they are requested
from, i.e. if the revision of the object in that context has the
property visible or not. That requires retrieving the VME meta-object
for QML declared properties. We can retrieve that directly from the
QObjectPrivate instead of going through the potential meta-object
builder creation path.
Task-number: QTBUG-61536
Change-Id: I695921d625169de5c58941087464beb5367fb2db
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The m_importDirCache caches the result of QDir/File::exists across
paths. By changing the data structure to a QCache we impose a limit on
the size of the entries and thus the memory consumption for long running
programs that access many qml files.
Task-number: QTBUG-61536
Change-Id: I20c4dc77260fe353c13da570b7e1bbd3f47d4b79
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| |
| | |
Task-number: QTBUG-61536
Change-Id: Ia2b5cfeab093d8be91728032528788dd238c2872
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is a pure metatype id to metatype id mapping, nothing
in there is specific to a QML engine instance. Thus move the
mapping to QQmlMetaType and make it global for all engines.
Task-number: QTBUG-61536
Change-Id: I3792567bc9f585e3e0fbbad94efd1ec3a0db3de0
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The QML engine destructor as well as trimComponentCache()
do now clean out unused composite types that the engine
registered internally.
This helps avoid 'static' leaks, when more and more types
would get registered by the engine.
Task-number: QTBUG-61536
Change-Id: I5b32af4b88fbf626de8c0bfbaedb2285b09e3679
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
QQmlTypeModulePrivate::types is not used (anymore?).
Task-number: QTBUG-61536
Change-Id: Ia7af542e6969c167d1f05a460e0926398f56f380
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|