| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allowing types with lowercase names causes ambiguity, as can be seen in
QTBUG-43567 and the comment in IRBuilder::visit(), which explains that
"the grammar can't distinguish between two different definitions" whose
only difference is casing of the first letter.
- Prevent registration (return -1 with e.g. qmlRegisterType()) when a
type name doesn't begin with an uppercase letter.
- Document the uppercase type name rule in more places.
Change-Id: I4e522c65990f418eaafa45a256e3cb07a3e01ba4
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In cases where Qt is used in a plugin it is possible that a plugin will
be unloaded while Qt itself is still loaded and as a result there is a
chance that there will be conflicting types registered.
Therefore, to ensure that plugins correctly clean up after themselves
cleanly, we need to add a means to unregister qml types. This is
intended to only be used when the user knows what they are doing.
Task-number: QTBUG-56521
Task-number: QTBUG-56532
Change-Id: Ie396e522385004e6e9f3841e04f8072ff29cb15b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 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>
|
|
|
|
|
|
|
|
|
|
| |
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 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make sure any QQmlType stored in the meta type data
has a refcount of 1. This should now make it possible
to clean out unused types by iterating over the
list of types and removing those that have a refcount
of 1.
Some care is still needed for C++ registered types, that
will need to get one more refcount, so we don't accidentally
remove them.
Task-number: QTBUG-61536
Change-Id: Id2a18dae5ddcb815f34013f5fde1f05d2d9d0214
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
| |
Instead of maintaining a hash per QQmlType and minor version, move the
version specific property caches into QQmlType.
Task-number: QTBUG-61536
Change-Id: I72f3990cb93e64ac5074060b4ff327043eab7966
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now that the property cache is independent of a specific
engine, we can cache them in QQmlType instead of caching
them per engine.
This simplifies the logic and avoids duplicated property
caches when multiple engines are running.
Task-number: QTBUG-61536
Change-Id: I6f082e1e7495ae0f5b92559e8d0a3437c56e303a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
QQmlType is now refcounted, and we need to use it by
value, to control it's lifetime properly. This is
required, so we can clean up the QQmlMetaTypeData
cache on engine destruction and with trimComponentCache()
Task-number: QTBUG-61536
Change-Id: If86391c86ea20a646ded7c9925d8f743f628fb91
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
| |
Task-number: QTBUG-61536
Change-Id: Ie40cb3a6e170331b0ec7ab5deaf7c1d7ef0cdaeb
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
| |
Task-number: QTBUG-61536
Change-Id: If906af2bf3afd09c23a612aaac417a751b06eba4
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
| |
We can have QML type names that are empty or end in '/'. In those cases
use the QMetaObject to retrieve a more meaningful type name.
Change-Id: I4dd0841de13d4e7524a104f0bbc08cb854484cfe
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
| |
No such function as qmlRegisterCompositeType.
Change-Id: I0a8faef8a707b64958a7023136a36853a99b7f0a
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
|
| |
| |
| |
| |
| |
| |
| |
| | |
Instead use QT_CONFIG(foo). This change actually detected a few
mis-spelled macros and invalid usages.
Change-Id: I06ac327098dd1a458e6bc379d637b8e2dac52f85
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is particularly useful for keeping the versions of related modules in
sync. For example, when QtQuick.Controls introduces new types or revisions
and bumps up the minor version, qmlRegisterModule() can be used to make the
same version available for QtQuick.Controls.Styles in case it doesn't have
new types or revisions to register.
[ChangeLog][QtQml] Introduced qmlRegisterModule() that can be used to
make a certain module version available, even if no types or revisions
are registered for that version.
Change-Id: I5ec457465cd778bb0adda55771d195f69cd4b31a
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| | |
These methods do not modify objects.
Change-Id: Iefe8effa97e6f6142308d61d57d08f9dc14a7709
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| |
| |
| | |
Reduce memory allocations.
Change-Id: Idfa6284757524396e6154cf8150be4228e9218be
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|/
|
|
|
|
|
| |
Not all, just instances with low risk.
Change-Id: Ie6b4530f748e04ccb90e7ef23415a91d6c377417
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
| |
For CoW types, prefer const methods to avoid needless detach()ing.
Change-Id: I13e4d5b091877319984c1ddaed4da8dc59a7c0a3
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/quick/items/context2d/qquickcanvasitem.cpp
src/quickwidgets/qquickwidget.cpp
tests/auto/quickwidgets/qquickwidget/tst_qquickwidget.cpp
Change-Id: Idf279cb88e0df2a383489af5b6afdf04d04ae611
|
| |\
| | |
| | |
| | | |
Change-Id: I70c0c672708522f7157849365cc53ee271d8e460
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Don't forget to drop refcount of QQmlTypeData object in
QQmlType::resolveCompositeBaseType() to prevent leakage.
Change-Id: I079839a3347def1c2ac8f9cc07a52debb885b36e
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>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This makes particularly sense as the binding property data per object that
allows us to avoid a by-name property lookup when instantiating types is also
stored there.
Change-Id: I4d9275c1d8fde252df83eb11a9dfea71e5e9583a
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This would not seem like a member variable that is hot enough to keep there and
it is two loads away.
Change-Id: Id7088771bd33545a2846cc3497e5904dd8ac4f5d
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: I867652aa168bd4a3eae191bf09946f98207a5ba6
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Doing so will spare us from creating a temporary container just to
iterate over it.
Change-Id: Iab6aec0d83bfc168f12d2348909b053dfddf67a1
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|/ /
| |
| |
| |
| | |
Change-Id: I7689fabb5398c2c2d2781b2c788dcc60f4e1ea44
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
|
|\|
| |
| |
| | |
Change-Id: Iec1b2de53c275996364c4bab0123ccb3e6e9895e
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Don't delete singletons objects that are created only from C++ and
have explicitSetObjectOwnership flag set, explicitSetObjectOwnership
flag is set only by QQmlEngine::setObjectOwnership.
Task-number: QTBUG-49865
Change-Id: I0ef658c2094e67b5cd9a1585e273144dfcee736a
Reviewed-by: Simon Hausmann <simon.hausmann@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>
|
|
|
|
|
|
|
|
|
|
| |
This way we can enable the usage of a single singletons in both
worlds. Currently singletons are destructed before the other QML
types, and using a singleton that is owned by C++ we don't need
to care about the destruction order anymore.
Change-Id: I120fcb8659e16321ae6e70c7b0d62be3bc650d73
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
Factor out the code to get the pretty QML type name
for an QObject from ~QQmlInfo and put it into
QQmlMetaType::prettyTypeName() method.
Change-Id: I54ab0c49ba4a52074877447ef67708104f954f2d
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>
|
|
|
|
|
|
|
|
| |
Avoid the implicit push inside the execution context constructor
and rather make this explicit in the code.
Change-Id: I1bb0fb523fddbb273fc666370d619f55f49cd40a
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When the callback passed to the function returns nullptr,
QQmlData::ensurePropertyCache(e, o) crashes.
Change-Id: I11efd7e9d6c5f18611e796d896384dd14a280303
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| | |
Found with GCC's -Wcast-qual.
Change-Id: Ia0aac2f09e9245339951ffff13c958364a2e9859
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
| |
| |
| |
| |
| | |
Change-Id: Id3d960ee8236a4c6f4bb4e0add1f88dfa32d3592
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Most of the code already has those #ifdefs, so let's add the missing
ones.
Change-Id: I2a46d5ab660daa837d9ce432184d0b55818a5dc1
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
| |
| |
| |
| |
| | |
Change-Id: Id4820ac458f48b10f2bf457144767efdef9e2c07
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
|
|/
|
|
|
| |
Change-Id: I3df6ac107cb46b3a1b15b80f39d7c6015adcd9ac
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
| |
Replace the use of QReadWriteLock with a plain QMutex. At this point
QReadWriteLock adds a lot of overhead due to its internal QHash and otherwise
offers little over a recursive mutex, especially given that there is most
of the time only one reading thread and one writing thread.
Change-Id: I0a91e4a64cff5d25e4a133ed46b08912e81bb055
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
| |
Avoid repeated instantiation of end() in loops, use variable instead.
Change-Id: I3bb1c6918cfd16a5dcefbcc03c442e99fe9bf76b
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.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>
|