Description
When certain changes to the XML of generated classes are made, these changes are performed internally, but the change is not visible in the generated code comments and, more importantly, not in the generated .pyi files.
Example:
We modify a function from QFile like so:
<object-type name="QFile"> <!-- PYSIDE-1499: Replace QString by pathlib.Path (qfile.h) --> <modify-function signature="QFile(const QString &)" return-type="PyObject*"> <modify-argument index="1"><replace-type modified-type="PyPathLike"/></modify-argument> <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qfile-path-1"/> </modify-function>
This has the desired effect to use PyPathLike instead of QString, but we can see the effect of this change nowhere.
As a workaround, we also added the function, giving
<object-type name="QFile"> <!-- PYSIDE-1499: Replace QString by pathlib.Path (qfile.h) --> <modify-function signature="QFile(const QString &)" return-type="PyObject*"> <modify-argument index="1"><replace-type modified-type="PyPathLike"/></modify-argument> <inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qfile-path-1"/> </modify-function> <add-function signature="QFile(const PyPathLike &@name@)"/>
This has the effect that additionally a new type is added, with the only purpose to show up in the signature, because the functionality is already covered by the modify-function.
It would be very nice to avoid this hackish workaround.