aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/PySide2/QtQml/pysideqmlregistertype.cpp
diff options
context:
space:
mode:
authorChristian Tismer <tismer@stackless.com>2020-05-04 17:38:04 +0200
committerChristian Tismer <tismer@stackless.com>2020-05-14 15:26:11 +0200
commitd6b81b6303957803582d0fae95a9b25483d8e7f2 (patch)
treeaab5f9f3438eb59c21ecc18530c0c48e5c10a393 /sources/pyside2/PySide2/QtQml/pysideqmlregistertype.cpp
parentf6519b1d343bc26a53374d3066e90495f1959c78 (diff)
shiboken: Prepare for introduction of __qualname__
To remove the groundwork from the next checkin, the step of replacing PyType_FromSpec with SbkType_FromSpec is extracted. This change introduces a packageLevel number that is generated as a name prefix in the class creation but does not use it, yet. Change-Id: Ic9061231708b546dbd3620d148bca24c27df60a5 Task-number: PYSIDE-1286 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/pyside2/PySide2/QtQml/pysideqmlregistertype.cpp')
-rw-r--r--sources/pyside2/PySide2/QtQml/pysideqmlregistertype.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/sources/pyside2/PySide2/QtQml/pysideqmlregistertype.cpp b/sources/pyside2/PySide2/QtQml/pysideqmlregistertype.cpp
index fb9a5a0cf..efc86a048 100644
--- a/sources/pyside2/PySide2/QtQml/pysideqmlregistertype.cpp
+++ b/sources/pyside2/PySide2/QtQml/pysideqmlregistertype.cpp
@@ -240,7 +240,7 @@ static PyType_Slot PropertyListType_slots[] = {
{0, 0}
};
static PyType_Spec PropertyListType_spec = {
- "PySide2.QtQml.ListProperty",
+ "2:PySide2.QtQml.ListProperty",
sizeof(PySideProperty),
0,
Py_TPFLAGS_DEFAULT,
@@ -253,7 +253,7 @@ PyTypeObject *PropertyListTypeF(void)
static PyTypeObject *type = nullptr;
if (!type) {
PyObject *bases = Py_BuildValue("(O)", PySidePropertyTypeF());
- type = (PyTypeObject *)PyType_FromSpecWithBases(&PropertyListType_spec, bases);
+ type = (PyTypeObject *)SbkType_FromSpecWithBases(&PropertyListType_spec, bases);
Py_XDECREF(bases);
}
return type;
@@ -454,7 +454,7 @@ static PyType_Slot QtQml_VolatileBoolType_slots[] = {
{0, 0}
};
static PyType_Spec QtQml_VolatileBoolType_spec = {
- "PySide2.QtQml.VolatileBool",
+ "2:PySide2.QtQml.VolatileBool",
sizeof(QtQml_VolatileBoolObject),
0,
Py_TPFLAGS_DEFAULT,
@@ -464,9 +464,8 @@ static PyType_Spec QtQml_VolatileBoolType_spec = {
PyTypeObject *QtQml_VolatileBoolTypeF(void)
{
- static PyTypeObject *type = nullptr;
- if (!type)
- type = (PyTypeObject *)PyType_FromSpec(&QtQml_VolatileBoolType_spec);
+ static PyTypeObject *type = reinterpret_cast<PyTypeObject *>(
+ SbkType_FromSpec(&QtQml_VolatileBoolType_spec));
return type;
}