- 
    Bug 
- 
    Resolution: Done
- 
    P3: Somewhat important 
- 
    None
- 
    5.15.0
- 
    None
- 
    Ubuntu 18.04.5 LTS
 gcc 7.5.0
 cmake 3.17.3
 Qt 5.15
 qtprotobuf 0.5.0
 
 cmake snippet:
 
 -- ShibokenGenerator base dir: /usr/local/lib/python3.6/dist-packages/shiboken2_generator
 -- Shiboken base dir: /usr/local/lib/python3.6/dist-packages/shiboken2
 -- Shiboken suffix: cpython-36m-x86_64-linux-gnu.so.5.15
 -- Shiboken include dir: /usr/local/lib/python3.6/dist-packages/shiboken2_generator/include
 -- Shiboken library: /usr/local/lib/python3.6/dist-packages/shiboken2/libshiboken2.cpython-36m-x86_64-linux-gnu.so.5.15
 -- Shiboken binary: /usr/local/lib/python3.6/dist-packages/shiboken2_generator/shiboken2
 -- Shiboken version: 5.15.0.a.1
 -- PySide2 base dir: /usr/local/lib/python3.6/dist-packages/PySide2
 -- PySide2 suffix: cpython-36m-x86_64-linux-gnu.so.5.15
 -- PySide include dir: /usr/local/lib/python3.6/dist-packages/PySide2/include
 -- PySide library: /usr/local/lib/python3.6/dist-packages/PySide2/libpyside2.cpython-36m-x86_64-linux-gnu.so.5.15
 -- PySide typesystems: /usr/local/lib/python3.6/dist-packages/PySide2/typesystems
 -- PySide2 version: 5.15.0Ubuntu 18.04.5 LTS gcc 7.5.0 cmake 3.17.3 Qt 5.15 qtprotobuf 0.5.0 cmake snippet: -- ShibokenGenerator base dir: /usr/local/lib/python3.6/dist-packages/shiboken2_generator -- Shiboken base dir: /usr/local/lib/python3.6/dist-packages/shiboken2 -- Shiboken suffix: cpython-36m-x86_64-linux-gnu.so.5.15 -- Shiboken include dir: /usr/local/lib/python3.6/dist-packages/shiboken2_generator/include -- Shiboken library: /usr/local/lib/python3.6/dist-packages/shiboken2/libshiboken2.cpython-36m-x86_64-linux-gnu.so.5.15 -- Shiboken binary: /usr/local/lib/python3.6/dist-packages/shiboken2_generator/shiboken2 -- Shiboken version: 5.15.0.a.1 -- PySide2 base dir: /usr/local/lib/python3.6/dist-packages/PySide2 -- PySide2 suffix: cpython-36m-x86_64-linux-gnu.so.5.15 -- PySide include dir: /usr/local/lib/python3.6/dist-packages/PySide2/include -- PySide library: /usr/local/lib/python3.6/dist-packages/PySide2/libpyside2.cpython-36m-x86_64-linux-gnu.so.5.15 -- PySide typesystems: /usr/local/lib/python3.6/dist-packages/PySide2/typesystems -- PySide2 version: 5.15.0
- 
        
- 
        b6eaa63a81654459827851a261ad50829cc511ba (pyside/pyside-setup/5.15)
This was raised in PYSIDE-845 but died since, perhaps I'm overlooking something.
I am generating Qt code using qtprotobuf, a fairly simple object with a couple of properties. In the generated cpp file I have call to qmlRegisterType<T>
Generating PySide2 code using Shiboken2 my global module wrapper header contains:
// workaround to access protected functions #define protected public #include <sbkconverter.h> #include <sbkpython.h> // Module Includes #include <pyside2_qtcore_python.h> #include <pyside2_qtgui_python.h> #include <pyside2_qtnetwork_python.h> #include <pyside2_qtqml_python.h> // Bound library includes #include <myprotobufheader.qpb.h> // Conversion Includes - Primitive Types #include "pysideqmlregistertype.h" #include <QString> #include <QStringList> #include <qabstractitemmodel.h> #include <signalmanager.h>
The culprit is the pysideqmlregistertype.h include. Which is a private header file from PySide2 sources (pyside-setup/sources/pyside2/PySide2/QtQml/). And even pyside2_qtqml_python.h includes this private header, during cmake build, as expected, I get the errors:
/usr/local/lib/python3.6/dist-packages/PySide2/include/QtQml/pyside2_qtqml_python.h:83:10: fatal error: pysideqmlregistertype.h: No such file or directory
 #include "pysideqmlregistertype.h"
If I add the source path where the header is located to my target_include_directories it works absolutely fine. I think the person in PYSIDE-845 just copied the file to PySide2/include/QtQml. I am including core and qml typesystems from PySide2
<load-typesystem name="typesystem_core.xml" generate="no"/> <load-typesystem name="typesystem_qml.xml" generate="no"/>
Is this a bug or an error on my side?
- relates to
- 
                    PYSIDE-845 pysideqmlregistertype.h should be deployed in includes -           
- Closed
 
-