| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
As the new QMultiHash does not store a separate copy of the key for each
value, we'd get dangling string references when the "wrong" values were
removed.
Change-Id: I4ccf6db8bdbf4d38ef393b66b61b285ce763f5c2
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
You can now import the latest version, a specific version, or, "auto"
which is the same version as the parent module.
[ChangeLog][QtQml] You can now procedurally add module imports to
modules, using qmlRegisterModuleImport(). However, actual import
statements in qmldir files should be preferred wherever possible.
Fixes: QTBUG-84899
Change-Id: I3b32dd8b07a19d31b6538b9a6bb436840862f345
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
We often want to retrieve all type modules of a specific URI, no matter
what version. Use a sorted vector to make those available without
iterating all modules. Also, use a unique_ptr rather than manual memory
management. Sorting the pointers should be fairly cheap, and we also
don't have to store the keys anymore.
Change-Id: I132c2ec3817afab1d60c3ba832d0b907ff6bfeb0
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
| |
The hash function should take a seed, and properly combine the hashes,
both operator== and qHash are better defined as friends.
Change-Id: I770a725b72477689a654078da6f57f750a85abbd
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As noted in QJSEnginePrivate::cache, there can be a race between
calling addRef on the QQmlPropertyCache and another thread derefing and
consequently deleting it. To avoid this, we introduce a doRef flag in
QQmlMetaTypeData::propertyCache, which tells it to ref the the cache.
This fixes the issue, as the QQmlMetaTypeDataPtr in propertyCache() acts
as a mutex.
Fixes: QTBUG-84692
Pick-to: 5.15
Change-Id: I962d28cfd22696aad89a660e41c55f63a8791b44
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
| |
Else on Windows there's a warning:
conversion from 'size_t' to 'uint', possible loss of data
Change-Id: Ifed4899409a13fed31c206ae1e0f195280ee2925
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
| |
Fixes: QTBUG-82453
Change-Id: I7e5682945a07c3af183becd3947a69568f139d16
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
| |
Retrieve the major version from the meta object revisions and use them
to register types and generate qmltypes files.
Change-Id: I35da8963457660d1a49ba9063574e1a68057a7ba
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In many places we carry major and minor versions or revisions that are
loosely coupled to minor versions. As the Qt minor version resets now,
we need to handle these things more systematically. In particular, we
need to add a "major" part to revisions.
QTypeRevision can express the current major/minor pairs more efficiently
and can also be used to add a major version to revisions. This change
does not change the semantics, yet, but only replaces the types.
Change-Id: Ie58ba8114d7e4c6427f0f28716deee71995c0d24
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
| |
This also implicitly changes a previous simple QHash::insert to
a QMultiHash::insert, changing its semantics.
Change-Id: I6ebafe83e9e374f2e1a4c7cd69adbc2d14e095a1
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
| |
If we compile the QML types into the main application we cannot depend
on plugin loading for triggering the registration. Rather, we need to
register them immediately.
Change-Id: I910fb13359f8b7524eafd7693c85205cb4ed4cd8
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We can use the new moc JSON output to collect all meta-objects at build
time and, for those that include QML element registration meta-data,
generate code that automatically registers these types with QML. This
eliminates the need to call qmlRegisterType manually.
For now this generates free-standing functions (per module) that need to
be called manually. This is intended as an intermediate step.
Task-number: QTBUG-68796
Change-Id: Ib414eef9757344feee488ebc7388f957b975347f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We don't need two mechanisms to do essentially the same thing.
QQmlTypeLoader::Blob::addImport() had an "optimization" to never check
for qmldir files of locked imports. This meant the first time you
imported a module with a plugin that locked the module you could use the
qmldir file to load additional .qml files afterwards. The second time
you imported the same thing, you couldn't. As this is not a great
example of consistent behavior, we drop this optimization and always
allow the qmldir files of plugins that lock the module to specify
additional QML files.
As a side effect of this, additional plugins listed in a qmldir file can
also now be loaded after the module has been locked by some other means.
However, any qmlRegisterFooBar() called from the module will be
prevented.
Change-Id: Idabb2bd5f75fc85b62f42625173672b4ae84382e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
| |
Conflicts:
src/qml/qml/qqmlmetatype.cpp
Change-Id: Ieff61c076e46eb50a059c8b0210f7f4d7ce0cbcf
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ths data structure should only be accessed when protected by the
metatype data lock. In fact we don't access it from anywhere else.
To make that more obvious, move it to the right place.
This allows us to eliminate some const_cast and poking around in
QQmlTypePrivate from the outside.
Change-Id: I16ffd240b9504b9c00010bdb2d17b05c8196fe8a
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|
|
|
|
|
|
| |
Conflicts:
src/qml/qml/qqmlmetatype.cpp
Change-Id: I517c001ea4eb0fdd8e469f9fffe5b7559a5b0795
|
|
|
|
|
|
|
|
|
|
|
|
| |
QQmlMetaTypeData does need to be exposed to the QQmlType ctors. Rather,
we can use factory functions to create the QQmlTypePrivate objects.
The static attachedPropertyIds should really be part of QQmlMetaTypeData
and access to them should be protected by the lock.
Task-number: QTBUG-73271
Change-Id: I154a3842fab03a02c710901a20afd1652364808d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These functions require the metatype data in multiple interdependent
places. If they are executed concurrently data races are almost
guaranteed.
Move the functions to qqmlmetatype.cpp and keep the metatype mutex
locked for their duration. Access to the internals of the metatype
system also allows us to significantly simplify the logic.
Additionally we can remove methods only used by those functions from the
public interface of QQmlMetaType now.
Task-number: QTBUG-73271
Change-Id: I1279259cca5cb5be63026d5b74f5d013e7a1ac5c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
Having all those classes in one big file promotes spaghetti code and
makes the code unreadable.
Change-Id: I3b6df93b9cfe1d97228771049b3054e78b868ea3
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|