aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/PySide6/QtQml/pysideqmlregistertype.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2021-03-11 10:42:36 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2021-03-11 15:19:42 +0100
commit146b3cb79c3f0927df3d7c5d9fdc9c67b976051d (patch)
treec2debab92f118f1da0fd4af05a3e72dc254c938a /sources/pyside6/PySide6/QtQml/pysideqmlregistertype.cpp
parent7d602dc46163be603e87b1ef4f8db7b1ab87c1f6 (diff)
libpyside: Fix some clang analzyer warnings
- Use nullptr - Initialize variables - Remove else after return - Remove C-style casts - Avoid constructing QString from const char * - Use emit for signals Change-Id: I6ba8cad51f4b2a22f94996d1a9d8c3ae87c35099 Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/pyside6/PySide6/QtQml/pysideqmlregistertype.cpp')
-rw-r--r--sources/pyside6/PySide6/QtQml/pysideqmlregistertype.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/sources/pyside6/PySide6/QtQml/pysideqmlregistertype.cpp b/sources/pyside6/PySide6/QtQml/pysideqmlregistertype.cpp
index 29fd8be77..6bcc1dccc 100644
--- a/sources/pyside6/PySide6/QtQml/pysideqmlregistertype.cpp
+++ b/sources/pyside6/PySide6/QtQml/pysideqmlregistertype.cpp
@@ -340,10 +340,10 @@ void propListTpFree(void *self)
}
static PyType_Slot PropertyListType_slots[] = {
- {Py_tp_init, (void *)propListTpInit},
- {Py_tp_free, (void *)propListTpFree},
- {Py_tp_dealloc, (void *)Sbk_object_dealloc},
- {0, 0}
+ {Py_tp_init, reinterpret_cast<void *>(propListTpInit)},
+ {Py_tp_free, reinterpret_cast<void *>(propListTpFree)},
+ {Py_tp_dealloc, reinterpret_cast<void *>(Sbk_object_dealloc)},
+ {0, nullptr}
};
static PyType_Spec PropertyListType_spec = {
"2:PySide6.QtQml.ListProperty",
@@ -558,7 +558,7 @@ static PyMethodDef QtQml_VolatileBoolObject_methods[] = {
{"set", reinterpret_cast<PyCFunction>(QtQml_VolatileBoolObject_set), METH_VARARGS,
"B.set(a) -> None. Sets the value of the volatile boolean"
},
- {Q_NULLPTR} /* Sentinel */
+ {nullptr, nullptr, 0, nullptr} /* Sentinel */
};
static PyObject *
@@ -592,11 +592,11 @@ QtQml_VolatileBoolObject_str(QtQml_VolatileBoolObject *self)
}
static PyType_Slot QtQml_VolatileBoolType_slots[] = {
- {Py_tp_repr, (void *)reinterpret_cast<reprfunc>(QtQml_VolatileBoolObject_repr)},
- {Py_tp_str, (void *)reinterpret_cast<reprfunc>(QtQml_VolatileBoolObject_str)},
- {Py_tp_methods, (void *)QtQml_VolatileBoolObject_methods},
- {Py_tp_new, (void *)QtQml_VolatileBoolObject_new},
- {Py_tp_dealloc, (void *)QtQml_VolatileBoolObject_dealloc},
+ {Py_tp_repr, reinterpret_cast<void *>(QtQml_VolatileBoolObject_repr)},
+ {Py_tp_str, reinterpret_cast<void *>(QtQml_VolatileBoolObject_str)},
+ {Py_tp_methods, reinterpret_cast<void *>(QtQml_VolatileBoolObject_methods)},
+ {Py_tp_new, reinterpret_cast<void *>(QtQml_VolatileBoolObject_new)},
+ {Py_tp_dealloc, reinterpret_cast<void *>(QtQml_VolatileBoolObject_dealloc)},
{0, 0}
};
static PyType_Spec QtQml_VolatileBoolType_spec = {