diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-05-25 16:33:12 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-05-25 16:33:12 +0200 |
commit | 39ac266455cc1c0ae970a47c34d3a6bc7372d750 (patch) | |
tree | 9577fe06bcb0e3096ef85af929a91eb37b037452 /sources/pyside2/libpyside/pysideproperty.cpp | |
parent | 9115712ef3a1be8b401c9cd306792dbc30c89bf0 (diff) | |
parent | 6717d3540fac74c91d9381958a08e60f6532d402 (diff) |
Merge remote-tracking branch 'origin/5.14' into 5.14.2
Change-Id: Id0650ec2b46f3c67eb2c9b400f5b31aab98c3c58
Diffstat (limited to 'sources/pyside2/libpyside/pysideproperty.cpp')
-rw-r--r-- | sources/pyside2/libpyside/pysideproperty.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sources/pyside2/libpyside/pysideproperty.cpp b/sources/pyside2/libpyside/pysideproperty.cpp index bdabf1202..77dc6f3fc 100644 --- a/sources/pyside2/libpyside/pysideproperty.cpp +++ b/sources/pyside2/libpyside/pysideproperty.cpp @@ -88,9 +88,9 @@ static PyType_Slot PySidePropertyType_slots[] = { {Py_tp_getset, PySidePropertyType_getset}, {0, 0} }; -// Dotted modulename is crucial for PyType_FromSpec to work. Is this name right? +// Dotted modulename is crucial for SbkType_FromSpec to work. Is this name right? static PyType_Spec PySidePropertyType_spec = { - "PySide2.QtCore.Property", + "2:PySide2.QtCore.Property", sizeof(PySideProperty), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_BASETYPE, @@ -100,9 +100,8 @@ static PyType_Spec PySidePropertyType_spec = { PyTypeObject *PySidePropertyTypeF(void) { - static PyTypeObject *type = nullptr; - if (!type) - type = (PyTypeObject *)PyType_FromSpec(&PySidePropertyType_spec); + static PyTypeObject *type = reinterpret_cast<PyTypeObject *>( + SbkType_FromSpec(&PySidePropertyType_spec)); return type; } |