diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2021-05-21 11:21:31 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-05-26 11:15:16 +0000 |
commit | 6684686cdb8ff47376978dd4209fa9e349d37b58 (patch) | |
tree | 8aa60f89f19f2e36ebd4c837d3adca5217be7fb7 /src/qml | |
parent | 190aca5e7d8f98b5c2242bfbe815703f3501a54a (diff) |
Restrict types from unversioned imports only by major version
The versionless import tells us that any version of the type is allowed.
We still record the major version because types have to be re-registered
for each major version. Any minor version belonging to that major
version is allowed, though. Restricting by minor version has the effect
of passing the minor version of the "host" type into grouped property
accesses. This is certainly unwelcome as the grouped type can have a
higher minor version than the host type.
Task-number: QTBUG-33179
Change-Id: I73f0f4fdaa00ac13cf91a4c21fd705c9dba070ec
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
(cherry picked from commit 5ca899164156ee49770ef3749e6d4b1567c00362)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/qml')
-rw-r--r-- | src/qml/qml/qqmlmetatypedata.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlmetatypedata.cpp b/src/qml/qml/qqmlmetatypedata.cpp index e973226053..a77419d0e0 100644 --- a/src/qml/qml/qqmlmetatypedata.cpp +++ b/src/qml/qml/qqmlmetatypedata.cpp @@ -172,7 +172,7 @@ QQmlPropertyCache *QQmlMetaTypeData::propertyCache(const QQmlType &type, QTypeRe : (version.hasMinorVersion() ? QTypeRevision::fromVersion(type.version().majorVersion(), version.minorVersion()) - : type.version()); + : QTypeRevision::fromMajorVersion(type.version().majorVersion())); while (metaObject) { QQmlType t = QQmlMetaType::qmlType(metaObject, type.module(), combinedVersion); |