Details
-
Bug
-
Resolution: Out of scope
-
Not Evaluated
-
None
-
5.14.1
-
None
Description
Consider the following header and type system:
#include <QLayout> class MyLayout : public QLayout { public: QLayoutItem* itemAt(int) const; };
<?xml version="1.0"?> <typesystem package="MyPackage"> <load-typesystem name="typesystem_gui.xml" generate="no"/> <object-type name="MyLayout"/> </typesystem>
Since MyLayout is a QLayout subclass, typesystem_widgets_common.xml will inject a call to addLayoutOwnership in the generated wrapper for itemAt, as seen on this tag from the QLayout::itemAt binding:
<inject-code class="target" position="end" file="../glue/qtwidgets.cpp" snippet="addownership-0"/>
The only way to get the generated wrapper to build is to expose the addLayoutOwnership function, for example by injecting the following:
<?xml version="1.0"?> <typesystem package="MyPackage"> <load-typesystem name="typesystem_gui.xml" generate="no"/> <object-type name="MyLayout"> <inject-code class="native" position="beginning" file="glue/qtwidgets.cpp" snippet="qlayout-help-functions"/> </object-type> </typesystem>
This means that
- the shiboken user has to have awareness of this implementation detail.
- the shiboken user has to expose the source glue/* files in their build system.
Could you confirm if this is the intended workflow, if we are doing something wrong, or if this is an actual issue on the Qt side?