aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sources/pyside6/libpyside/dynamicqmetaobject.cpp2
-rw-r--r--sources/pyside6/libpyside/pyside.cpp5
-rw-r--r--sources/pyside6/libpyside/pysidesignal.cpp4
-rw-r--r--sources/pyside6/libpyside/pysideweakref.h6
-rw-r--r--sources/pyside6/libpyside/signalmanager.cpp2
-rw-r--r--sources/pyside6/libpyside/signalmanager.h1
6 files changed, 9 insertions, 11 deletions
diff --git a/sources/pyside6/libpyside/dynamicqmetaobject.cpp b/sources/pyside6/libpyside/dynamicqmetaobject.cpp
index 95acab869..afcf95f8f 100644
--- a/sources/pyside6/libpyside/dynamicqmetaobject.cpp
+++ b/sources/pyside6/libpyside/dynamicqmetaobject.cpp
@@ -591,7 +591,7 @@ void MetaObjectBuilderPrivate::parsePythonType(PyTypeObject *type)
basesToCheck.push_back(type);
auto *sbkObjTypeF = SbkObject_TypeF();
- auto *baseObjType = reinterpret_cast<PyTypeObject *>(&PyBaseObject_Type);
+ auto *baseObjType = &PyBaseObject_Type;
for (Py_ssize_t i = 0; i < basesCount; ++i) {
auto *baseType = reinterpret_cast<PyTypeObject *>(PyTuple_GetItem(mro, i));
if (baseType != sbkObjTypeF && baseType != baseObjType
diff --git a/sources/pyside6/libpyside/pyside.cpp b/sources/pyside6/libpyside/pyside.cpp
index f3d20a023..e061f16a9 100644
--- a/sources/pyside6/libpyside/pyside.cpp
+++ b/sources/pyside6/libpyside/pyside.cpp
@@ -782,10 +782,7 @@ PyTypeObject *getTypeForQObject(const QObject *cppSelf)
if (existing != nullptr)
return reinterpret_cast<PyObject *>(existing)->ob_type;
// Find the best match (will return a PySide type)
- auto *sbkObjectType = Shiboken::ObjectType::typeForTypeName(typeName(cppSelf));
- if (sbkObjectType != nullptr)
- return reinterpret_cast<PyTypeObject *>(sbkObjectType);
- return nullptr;
+ return Shiboken::ObjectType::typeForTypeName(typeName(cppSelf));
}
PyObject *getWrapperForQObject(QObject *cppSelf, PyTypeObject *sbk_type)
diff --git a/sources/pyside6/libpyside/pysidesignal.cpp b/sources/pyside6/libpyside/pysidesignal.cpp
index 887db917a..32f00877b 100644
--- a/sources/pyside6/libpyside/pysidesignal.cpp
+++ b/sources/pyside6/libpyside/pysidesignal.cpp
@@ -567,9 +567,9 @@ static PyObject *signalInstanceConnect(PyObject *self, PyObject *args, PyObject
connectionType);
return Shiboken::Conversions::copyToPython(metaObjConnectionConverter(), &conn);
}
- targetWalk = reinterpret_cast<PySideSignalInstance *>(targetWalk->d->next);
+ targetWalk = targetWalk->d->next;
}
- sourceWalk = reinterpret_cast<PySideSignalInstance *>(sourceWalk->d->next);
+ sourceWalk = sourceWalk->d->next;
}
return PyErr_Format(PyExc_RuntimeError, "Failed to connect signal %s.",
source->d->signature.constData());
diff --git a/sources/pyside6/libpyside/pysideweakref.h b/sources/pyside6/libpyside/pysideweakref.h
index e29c73455..9ebf3f5d8 100644
--- a/sources/pyside6/libpyside/pysideweakref.h
+++ b/sources/pyside6/libpyside/pysideweakref.h
@@ -1,8 +1,8 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-#ifndef __PYSIDEWEAKREF__
-#define __PYSIDEWEAKREF__
+#ifndef PYSIDEWEAKREF_H
+#define PYSIDEWEAKREF_H
#include <pysidemacros.h>
#include <sbkpython.h>
@@ -15,4 +15,4 @@ PYSIDE_API PyObject* create(PyObject* ob, PySideWeakRefFunction func, void* user
} // namespace PySide::WeakRef
-#endif
+#endif // PYSIDEWEAKREF_H
diff --git a/sources/pyside6/libpyside/signalmanager.cpp b/sources/pyside6/libpyside/signalmanager.cpp
index fe9934292..744b77b51 100644
--- a/sources/pyside6/libpyside/signalmanager.cpp
+++ b/sources/pyside6/libpyside/signalmanager.cpp
@@ -407,7 +407,7 @@ int SignalManagerPrivate::qtMethodMetacall(QObject *object,
// because the object can be deleted inside the called slot.
if (gil == nullptr)
- gil.reset(new Shiboken::GilState);
+ gil = std::make_unique<Shiboken::GilState>();
if (PyErr_Occurred())
handleMetaCallError(object, &result);
diff --git a/sources/pyside6/libpyside/signalmanager.h b/sources/pyside6/libpyside/signalmanager.h
index ee39a3a8d..1ac55786e 100644
--- a/sources/pyside6/libpyside/signalmanager.h
+++ b/sources/pyside6/libpyside/signalmanager.h
@@ -54,6 +54,7 @@ class PYSIDE_API SignalManager
{
public:
Q_DISABLE_COPY_MOVE(SignalManager)
+ ~SignalManager() = default;
using QmlMetaCallErrorHandler = std::optional<int>(*)(QObject *object);