aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside6')
-rw-r--r--sources/pyside6/PySide6/QtQml/typesystem_qml.xml4
-rw-r--r--sources/pyside6/PySide6/pysidewtypes.h12
-rw-r--r--sources/pyside6/libpyside/class_property.h4
-rw-r--r--sources/pyside6/libpyside/feature_select.cpp6
-rw-r--r--sources/pyside6/libpyside/pyside.cpp2
-rw-r--r--sources/pyside6/libpyside/pysideslot.cpp4
-rw-r--r--sources/pyside6/libpyside/pysideweakref.cpp4
-rw-r--r--sources/pyside6/libpyside/pysideweakref.h2
-rw-r--r--sources/pyside6/tests/pysidetest/testobject.h8
9 files changed, 22 insertions, 24 deletions
diff --git a/sources/pyside6/PySide6/QtQml/typesystem_qml.xml b/sources/pyside6/PySide6/QtQml/typesystem_qml.xml
index d3ad64bab..b5538dcba 100644
--- a/sources/pyside6/PySide6/QtQml/typesystem_qml.xml
+++ b/sources/pyside6/PySide6/QtQml/typesystem_qml.xml
@@ -15,10 +15,10 @@
using AtomicBool = std::atomic<bool>;
- typedef struct {
+ struct QtQml_VolatileBoolObject {
PyObject_HEAD
AtomicBool *flag;
- } QtQml_VolatileBoolObject;
+ };
</inject-code>
<inject-code class="native" position="beginning">
diff --git a/sources/pyside6/PySide6/pysidewtypes.h b/sources/pyside6/PySide6/pysidewtypes.h
index 4e6cf8263..f853949ac 100644
--- a/sources/pyside6/PySide6/pysidewtypes.h
+++ b/sources/pyside6/PySide6/pysidewtypes.h
@@ -4,12 +4,12 @@
#ifndef __PYSIDEWTYPES__
#define __PYSIDEWTYPES__
-typedef struct HWND__ *HWND;
-typedef unsigned UINT;
-typedef long LONG;
-typedef unsigned long DWORD;
-typedef UINT WPARAM;
-typedef LONG LPARAM;
+using HWND = struct HWND__ *;
+using UINT = unsigned;
+using LONG = long;
+using DWORD = unsigned long;
+using WPARAM = UINT;
+using LPARAM = LONG;
struct POINT
{
diff --git a/sources/pyside6/libpyside/class_property.h b/sources/pyside6/libpyside/class_property.h
index e34afe669..a3125b169 100644
--- a/sources/pyside6/libpyside/class_property.h
+++ b/sources/pyside6/libpyside/class_property.h
@@ -9,7 +9,7 @@
extern "C" {
-typedef struct {
+struct propertyobject {
PyObject_HEAD
PyObject *prop_get;
PyObject *prop_set;
@@ -21,7 +21,7 @@ typedef struct {
PyObject *prop_name;
#endif
int getter_doc;
-} propertyobject;
+};
PYSIDE_API PyTypeObject *PyClassProperty_TypeF();
diff --git a/sources/pyside6/libpyside/feature_select.cpp b/sources/pyside6/libpyside/feature_select.cpp
index 6d0389914..9b778f4e5 100644
--- a/sources/pyside6/libpyside/feature_select.cpp
+++ b/sources/pyside6/libpyside/feature_select.cpp
@@ -93,7 +93,7 @@ namespace PySide::Feature {
using namespace Shiboken;
-typedef bool(*FeatureProc)(PyTypeObject *type, PyObject *prev_dict, int id);
+using FeatureProc = bool(*)(PyTypeObject *type, PyObject *prev_dict, int id);
static FeatureProc *featurePointer = nullptr;
@@ -501,12 +501,12 @@ static bool feature_01_addLowerNames(PyTypeObject *type, PyObject *prev_dict, in
// This is the Python 2 version for inspection of m_ml, only.
// The actual Python 3 version is larget.
-typedef struct {
+struct PyCFunctionObject {
PyObject_HEAD
PyMethodDef *m_ml; /* Description of the C function to call */
PyObject *m_self; /* Passed as 'self' arg to the C func, can be NULL */
PyObject *m_module; /* The __module__ attribute, can be anything */
-} PyCFunctionObject;
+};
static PyObject *modifyStaticToClassMethod(PyTypeObject *type, PyObject *sm)
{
diff --git a/sources/pyside6/libpyside/pyside.cpp b/sources/pyside6/libpyside/pyside.cpp
index 9c2e021ba..77cc303c7 100644
--- a/sources/pyside6/libpyside/pyside.cpp
+++ b/sources/pyside6/libpyside/pyside.cpp
@@ -646,7 +646,7 @@ void setNextQObjectMemoryAddr(void *addr)
// A std::shared_ptr is used with a deletion function to invalidate a pointer
// when the property value is cleared. This should be a QSharedPointer with
// a void *pointer, but that isn't allowed
-typedef char any_t;
+using any_t = char;
Q_DECLARE_METATYPE(std::shared_ptr<any_t>);
diff --git a/sources/pyside6/libpyside/pysideslot.cpp b/sources/pyside6/libpyside/pysideslot.cpp
index 720ce3324..3954f5efa 100644
--- a/sources/pyside6/libpyside/pysideslot.cpp
+++ b/sources/pyside6/libpyside/pysideslot.cpp
@@ -20,11 +20,11 @@ struct SlotData
QByteArray resultType;
};
-typedef struct
+struct PySideSlot
{
PyObject_HEAD
SlotData *slotData;
-} PySideSlot;
+};
extern "C"
{
diff --git a/sources/pyside6/libpyside/pysideweakref.cpp b/sources/pyside6/libpyside/pysideweakref.cpp
index 90b6c6bb8..c0ef2586f 100644
--- a/sources/pyside6/libpyside/pysideweakref.cpp
+++ b/sources/pyside6/libpyside/pysideweakref.cpp
@@ -6,12 +6,12 @@
#include <sbkpython.h>
#include <shiboken.h>
-typedef struct {
+struct PySideCallableObject {
PyObject_HEAD
/* Type-specific fields go here. */
PySideWeakRefFunction weakref_func;
void *user_data;
-} PySideCallableObject;
+};
static PyObject *CallableObject_call(PyObject *callable_object, PyObject *args, PyObject *kw);
diff --git a/sources/pyside6/libpyside/pysideweakref.h b/sources/pyside6/libpyside/pysideweakref.h
index 2cc232d46..e29c73455 100644
--- a/sources/pyside6/libpyside/pysideweakref.h
+++ b/sources/pyside6/libpyside/pysideweakref.h
@@ -7,7 +7,7 @@
#include <pysidemacros.h>
#include <sbkpython.h>
-typedef void (*PySideWeakRefFunction)(void* userData);
+using PySideWeakRefFunction = void (*)(void *userData);
namespace PySide::WeakRef {
diff --git a/sources/pyside6/tests/pysidetest/testobject.h b/sources/pyside6/tests/pysidetest/testobject.h
index 88652bcca..359387730 100644
--- a/sources/pyside6/tests/pysidetest/testobject.h
+++ b/sources/pyside6/tests/pysidetest/testobject.h
@@ -23,7 +23,7 @@ public:
int value;
};
-typedef IntValue TypedefValue;
+using TypedefValue = IntValue;
class PYSIDETEST_API TestObject : public QObject
{
@@ -60,8 +60,7 @@ private:
PYSIDETEST_API QDebug operator<<(QDebug dbg, TestObject &testObject);
-typedef int PySideInt;
-
+using PySideInt = int;
namespace PySideCPP {
@@ -100,8 +99,7 @@ namespace PySideCPP2 {
enum Enum1 { Option1 = 1, Option2 = 2 };
-
-typedef long PySideLong;
+using PySideLong = long;
class PYSIDETEST_API TestObjectWithoutNamespace : public QObject
{