aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/PySide6/glue
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside6/PySide6/glue')
-rw-r--r--sources/pyside6/PySide6/glue/qtcore.cpp7
-rw-r--r--sources/pyside6/PySide6/glue/qtwidgets.cpp2
2 files changed, 4 insertions, 5 deletions
diff --git a/sources/pyside6/PySide6/glue/qtcore.cpp b/sources/pyside6/PySide6/glue/qtcore.cpp
index d749c17c1..ad5eb447f 100644
--- a/sources/pyside6/PySide6/glue/qtcore.cpp
+++ b/sources/pyside6/PySide6/glue/qtcore.cpp
@@ -150,8 +150,7 @@ return %out;
static QMetaType QVariant_resolveMetaType(PyTypeObject *type)
{
if (PyObject_TypeCheck(type, SbkObjectType_TypeF())) {
- auto sbkType = reinterpret_cast<SbkObjectType *>(type);
- const char *typeName = Shiboken::ObjectType::getOriginalName(sbkType);
+ const char *typeName = Shiboken::ObjectType::getOriginalName(type);
if (!typeName)
return {};
const bool valueType = '*' != typeName[qstrlen(typeName) - 1];
@@ -1316,7 +1315,7 @@ auto *ptr = reinterpret_cast<uchar *>(Shiboken::Buffer::getPointer(%PYARG_1, &si
// %FUNCTION_NAME() - disable generation of c++ function call
(void) %2; // remove warning about unused variable
Shiboken::AutoDecRef emptyTuple(PyTuple_New(0));
-auto *timerType = reinterpret_cast<PyTypeObject *>(Shiboken::SbkType<QTimer>());
+auto *timerType = Shiboken::SbkType<QTimer>();
auto *pyTimer = timerType->tp_new(Shiboken::SbkType<QTimer>(), emptyTuple, nullptr);
timerType->tp_init(pyTimer, emptyTuple, nullptr);
@@ -1339,7 +1338,7 @@ timer->start(%1);
// @snippet qtimer-singleshot-2
// %FUNCTION_NAME() - disable generation of c++ function call
Shiboken::AutoDecRef emptyTuple(PyTuple_New(0));
-auto *timerType = reinterpret_cast<PyTypeObject *>(Shiboken::SbkType<QTimer>());
+auto *timerType = Shiboken::SbkType<QTimer>();
auto *pyTimer = timerType->tp_new(Shiboken::SbkType<QTimer>(), emptyTuple, nullptr);
timerType->tp_init(pyTimer, emptyTuple, nullptr);
QTimer * timer = %CONVERTTOCPP[QTimer *](pyTimer);
diff --git a/sources/pyside6/PySide6/glue/qtwidgets.cpp b/sources/pyside6/PySide6/glue/qtwidgets.cpp
index d2b7872d4..802a3c172 100644
--- a/sources/pyside6/PySide6/glue/qtwidgets.cpp
+++ b/sources/pyside6/PySide6/glue/qtwidgets.cpp
@@ -56,7 +56,7 @@ Shiboken::Object::releaseOwnership(%PYARG_0);
// @snippet qgraphicsitem
PyObject *userTypeConstant = PyLong_FromLong(QGraphicsItem::UserType);
-PyDict_SetItemString(reinterpret_cast<PyTypeObject *>(Sbk_QGraphicsItem_TypeF())->tp_dict, "UserType", userTypeConstant);
+PyDict_SetItemString(Sbk_QGraphicsItem_TypeF()->tp_dict, "UserType", userTypeConstant);
// @snippet qgraphicsitem
// @snippet qgraphicsitem-scene-return-parenting