diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-03-03 08:26:38 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-03-04 12:33:40 +0100 |
commit | 6fe78675ee08abff60094dbc80d298c2084f6e3c (patch) | |
tree | 920fefee915ec5b6f4dd7f873e17f8b2c9d39cd7 /sources/pyside6/libpysideqml | |
parent | 6018f626efa88c79f3fff14d32a5e7273b11fe90 (diff) |
libpysideqml: Fix size of QObject
Simply use int(sizeof(QObject)). The original code was written
with a cross-build mindset, but libpysideqml is built on the target.
Amends f017d4abe8199e203a5e625738d312932804601d.
Task-number: PYSIDE-1709
Change-Id: Ie003b7a4733050d5bcd3f895d436bc0eb8c3bff1
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/pyside6/libpysideqml')
-rw-r--r-- | sources/pyside6/libpysideqml/pysideqmlregistertype.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sources/pyside6/libpysideqml/pysideqmlregistertype.cpp b/sources/pyside6/libpysideqml/pysideqmlregistertype.cpp index 94b4897e1..bbcf63e98 100644 --- a/sources/pyside6/libpysideqml/pysideqmlregistertype.cpp +++ b/sources/pyside6/libpysideqml/pysideqmlregistertype.cpp @@ -159,11 +159,9 @@ int qmlRegisterType(PyObject *pyObj, const char *uri, int versionMajor, type.parserStatusCast = QQmlPrivate::StaticCastSelector<QObject, QQmlParserStatus>::cast(); // QPyQmlPropertyValueSource inherits QObject, QmlPropertyValueSource, so, - // it is found behind the QObject. The size of a plain QObject is - // the wrapper size - 8 bools from the method cache array. - const int qObjectSize = int(PySide::getSizeOfQObject(qobjectType)) - 8; + // it is found behind the QObject. type.valueSourceCast = isQmlPropertyValueSource(metaObject) - ? qObjectSize + ? int(sizeof(QObject)) : QQmlPrivate::StaticCastSelector<QObject, QQmlPropertyValueSource>::cast(); type.valueInterceptorCast = QQmlPrivate::StaticCastSelector<QObject, QQmlPropertyValueInterceptor>::cast(); |