Details
-
Bug
-
Resolution: Out of scope
-
Not Evaluated
-
None
-
6.5.0
-
None
Description
When generating binding with shiboken, if a class has a private virtual pure method which has an argument of type not bound (because I don't want to expose it in Python API), Shiboken doesn't consider this method and so doesn't consider the class abstract and so the generated binding fail at compile time.
See joined example. If you remove the virtual pure method or define ANotBindedType in typesystem, it works. If not, you'll get the following warning at binding generation
skipping abstract function 'void AnAbstractClass::apurevirtualmethod(ANotBindedType*)', unmatched type 'ANotBindedType*' in parameter #1 " type": Unable to translate type "ANotBindedType*": Cannot find type entry for "ANotBindedType". This will lead to compilation errors due to not being able to instantiate the wrapper.
which indeed, leads to compilation error.
Command lines to generate the binding
clang++ -I/home/julien/myconf/qt-examples/shiboken_abstract -isystem /usr/local/lib/python3.11/dist-packages/PySide6/include -std=gnu++17 -isystem /home/julien/work/depends/Qt/6.5.0/gcc_64/include/ -I/usr/includ e/python3.11 -I/home/julien/work/pyside-setup/install/include/shiboken6 -I/tmp/shiboken_output/core -c /tmp/shiboken_output/core/anabstractclass_wrapper.cpp shiboken6 -generator-set=shiboken --enable-parent-ctor-heuristic --enable-pyside-extensions --enable-return-value-heuristic --use-isnull-as-nb_nonzero -std=c++17 -ou tput-directory=/tmp/shiboken_output anabstractclass.h typesystem.xml