aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2020-06-04 12:17:56 +0200
committerUlf Hermann <ulf.hermann@qt.io>2020-06-04 15:53:15 +0200
commit6245fa6752c7db9cd1904defaa375788787cac2d (patch)
treec3b745706ff99b000a4bb70ef1c7ed03735e6c8b /src/qml
parent331fca0bb06492c270116de24b528e6b80b39c97 (diff)
Adapt to new MetaObject revision
The number of ints per method has increased. Change-Id: I1142abd969724e7c35fedbf6e849eab3ec90be26 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml')
-rw-r--r--src/qml/qml/qqmlpropertycache.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/qml/qml/qqmlpropertycache.cpp b/src/qml/qml/qqmlpropertycache.cpp
index 6cf09e4886..da9445a4b0 100644
--- a/src/qml/qml/qqmlpropertycache.cpp
+++ b/src/qml/qml/qqmlpropertycache.cpp
@@ -1221,14 +1221,12 @@ template <typename StringVisitor, typename TypeInfoVisitor>
int visitMethods(const QMetaObject &mo, int methodOffset, int methodCount,
StringVisitor visitString, TypeInfoVisitor visitTypeInfo)
{
- const int intsPerMethod = 5;
-
int fieldsForParameterData = 0;
bool hasRevisionedMethods = false;
for (int i = 0; i < methodCount; ++i) {
- const int handle = methodOffset + i * intsPerMethod;
+ const int handle = methodOffset + i * QMetaObjectPrivate::IntsPerMethod;
const uint flags = mo.d.data[handle + 4];
if (flags & MethodRevisioned)
@@ -1258,7 +1256,8 @@ int visitMethods(const QMetaObject &mo, int methodOffset, int methodCount,
if (hasRevisionedMethods)
fieldsForRevisions = methodCount;
- return methodCount * intsPerMethod + fieldsForRevisions + fieldsForParameterData;
+ return methodCount * QMetaObjectPrivate::IntsPerMethod
+ + fieldsForRevisions + fieldsForParameterData;
}
template <typename StringVisitor, typename TypeInfoVisitor>
@@ -1370,9 +1369,8 @@ bool QQmlPropertyCache::determineMetaObjectSizes(const QMetaObject &mo, int *fie
int *stringCount)
{
const QMetaObjectPrivate *priv = reinterpret_cast<const QMetaObjectPrivate*>(mo.d.data);
- if (priv->revision < 7 || priv->revision > 8) {
+ if (priv->revision != 9)
return false;
- }
uint highestStringIndex = 0;
const auto stringIndexVisitor = [&highestStringIndex](uint index) {