aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlpropertycachecreator.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2020-01-16 15:00:36 +0100
committerUlf Hermann <ulf.hermann@qt.io>2020-02-13 12:48:07 +0100
commit164e559c8a7a34aa46ef7563a19100f81a1cade4 (patch)
tree5fcef6001bbc66c4589c852603a27d93f2aa0b09 /src/qml/qml/qqmlpropertycachecreator.cpp
parent4b8699c88bcd129a3fe34155654921ff3d5ffd5d (diff)
Process major versions as part of Q_REVISION
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>
Diffstat (limited to 'src/qml/qml/qqmlpropertycachecreator.cpp')
-rw-r--r--src/qml/qml/qqmlpropertycachecreator.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/qml/qml/qqmlpropertycachecreator.cpp b/src/qml/qml/qqmlpropertycachecreator.cpp
index 5e83deff18..f132fb2d78 100644
--- a/src/qml/qml/qqmlpropertycachecreator.cpp
+++ b/src/qml/qml/qqmlpropertycachecreator.cpp
@@ -119,13 +119,10 @@ QQmlRefPointer<QQmlPropertyCache> QQmlBindingInstantiationContext::instantiating
{
if (instantiatingProperty) {
if (instantiatingProperty->isQObject()) {
- // If the typeVersion is invalid here, we want to match any version we can find.
- // 254.254 is the largest version QTypeRevision can hold.
- return enginePrivate->rawPropertyCacheForType(
- instantiatingProperty->propType(),
- instantiatingProperty->typeVersion().isValid()
- ? instantiatingProperty->typeVersion()
- : QTypeRevision::fromVersion(254, 254));
+ // rawPropertyCacheForType assumes a given unspecified version means "any version".
+ // There is another overload that takes no version, which we shall not use here.
+ return enginePrivate->rawPropertyCacheForType(instantiatingProperty->propType(),
+ instantiatingProperty->typeVersion());
} else if (const QMetaObject *vtmo = QQmlValueTypeFactory::metaObjectForMetaType(instantiatingProperty->propType())) {
return enginePrivate->cache(vtmo, instantiatingProperty->typeVersion());
}