aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/libpysideqml/pysideqmlattached.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside6/libpysideqml/pysideqmlattached.cpp')
-rw-r--r--sources/pyside6/libpysideqml/pysideqmlattached.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/sources/pyside6/libpysideqml/pysideqmlattached.cpp b/sources/pyside6/libpysideqml/pysideqmlattached.cpp
index 41d7dee97..4b6666d8a 100644
--- a/sources/pyside6/libpysideqml/pysideqmlattached.cpp
+++ b/sources/pyside6/libpysideqml/pysideqmlattached.cpp
@@ -166,12 +166,13 @@ void initQmlAttached(PyObject *module)
std::fill(attachingTypes, attachingTypes + MAX_ATTACHING_TYPES, nullptr);
AttachedFactoryInitializer<MAX_ATTACHING_TYPES - 1>::init();
- if (InitSignatureStrings(PySideQmlAttached_TypeF(), qmlAttached_SignatureStrings) < 0)
+ auto *qmlAttachedType = PySideQmlAttached_TypeF();
+ if (InitSignatureStrings(qmlAttachedType, qmlAttached_SignatureStrings) < 0)
return;
- Py_INCREF(PySideQmlAttached_TypeF());
- PyModule_AddObject(module, "QmlAttached",
- reinterpret_cast<PyObject *>(PySideQmlAttached_TypeF()));
+ auto *obQmlAttachedType = reinterpret_cast<PyObject *>(qmlAttachedType);
+ Py_INCREF(obQmlAttachedType);
+ PyModule_AddObject(module, "QmlAttached", obQmlAttachedType);
}
PySide::Qml::QmlExtensionInfo qmlAttachedInfo(PyTypeObject *t,