summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-01-08 09:02:04 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-01-08 10:17:24 +0000
commit1bd279b01d06eba0abbbb5fea0c12a6de2600cdd (patch)
treeb8db7fa316ff5a3e53a5045ad63f9f2afaf5cc62
parent4786ceb39b513b34cfe83874ae590866d19be2db (diff)
libpyside: Use helper function for accessing the meta object in quick type registration
Fix an oversight of bbd32e9e52bda460dd1cb75d128dd1165d1fd152. Task-number: PYSIDE-784 Change-Id: Ic48fbed24bc86a848accda46602fd3f5cb27d411 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com>
-rw-r--r--sources/pyside2/PySide2/QtQuick/pysidequickregistertype.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/sources/pyside2/PySide2/QtQuick/pysidequickregistertype.cpp b/sources/pyside2/PySide2/QtQuick/pysidequickregistertype.cpp
index 93a8f281..e50b1dfc 100644
--- a/sources/pyside2/PySide2/QtQuick/pysidequickregistertype.cpp
+++ b/sources/pyside2/PySide2/QtQuick/pysidequickregistertype.cpp
@@ -40,6 +40,7 @@
#include "pysidequickregistertype.h"
#include <pyside.h>
+#include <pyside_p.h>
#include <shiboken.h>
// Auto generated headers.
@@ -122,7 +123,7 @@ void registerTypeIfInheritsFromClass(
PyTypeObject *typeToRegister,
const QByteArray &typePointerName,
const QByteArray &typeListName,
- QMetaObject *typeMetaObject,
+ const QMetaObject *typeMetaObject,
QQmlPrivate::RegisterType *type,
bool &registered)
{
@@ -199,9 +200,7 @@ bool quickRegisterType(PyObject *pyObj, const char *uri, int versionMajor, int v
return false;
// Used inside macros to register the type.
- QMetaObject *metaObject =
- reinterpret_cast<QMetaObject *>(
- ObjectType::getTypeUserData(reinterpret_cast<SbkObjectType *>(pyObj)));
+ const QMetaObject *metaObject = PySide::retrieveMetaObject(pyObj);
Q_ASSERT(metaObject);