Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-1381

Shiboken2 includes a private header pysideqmlregistertype.h in "Conversion Includes - Primitive Types".



    • Bug
    • Status: Closed
    • P3: Somewhat important
    • Resolution: Done
    • 5.15.0
    • None
    • PySide, Shiboken
    • None
    • Linux/X11
    • 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?



        Issue Links

          For Gerrit Dashboard: PYSIDE-1381
          # Subject Branch Project Status CR V



              kleint Friedemann Kleint
              alexmarch Alex March
              0 Vote for this issue
              1 Start watching this issue



                Gerrit Reviews

                  There are no open Gerrit changes