aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/libpysideqml/pysideqmlattached.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2025-08-28 12:10:27 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2025-09-03 10:46:27 +0200
commite068fe929a7e90a3c5c7844b14fbe15891349c10 (patch)
tree9ff47c65d7d75e0d8cd708c82f7fa0ff9cd1d788 /sources/pyside6/libpysideqml/pysideqmlattached.cpp
parent6a657da8f490e65368550f39f0cd7042db228bac (diff)
Fix compilation with Python 3.14/raised limited API/PyObject parameters
Some macros (Py_INCREF/Py_TYPE) were reimplemented as functions, unearthing some type incompatibilities. Pick-to: 6.9 6.8 Task-number: PYSIDE-3147 Change-Id: If10bc5941d718d8845c7bbd5facf6021539aad34 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
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,