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

using shared pointer for third-party type: SKB_*_IDX was not declared in this scope

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Not Evaluated
    • 6.0.0
    • 5.12.3
    • Shiboken
    • None

    Description

      This is related to PYSIDE-1024: It's now apparently impossible to use a non-smartptr type from one lib wrapped in a smartptr in another lib. The attached patch exemplifies this:

      libsample wraps Pen but doesn't use it in a smartptr anywhere
      libother tries to use SharedPtr<Pen>, but that then triggers:

      [ 98%] Building CXX object tests/otherbinding/CMakeFiles/other.dir/other/otherobjecttype_wrapper.cpp.o
      /home/milian/projects/qt5/src/pyside-setup/pyside3d_build/py3.7-qt5.12.4-64bit-debug/shiboken2/tests/otherbinding/other/otherobjecttype_wrapper.cpp: In function ‘PyObject* Sbk_OtherObjectTypeFunc_foo(PyObject*, PyObject*)’:
      /home/milian/projects/qt5/src/pyside-setup/pyside3d_build/py3.7-qt5.12.4-64bit-debug/shiboken2/tests/otherbinding/other/otherobjecttype_wrapper.cpp:310:129: error: ‘SBK_SHAREDPTR_PEN_IDX’ was not declared in this scope; did you mean ‘SBK_SHAREDPTR_OBJ_IDX’?
        310 |     if ((pythonToCpp = Shiboken::Conversions::isPythonToCppReferenceConvertible(reinterpret_cast<SbkObjectType *>(SbksmartTypes[SBK_SHAREDPTR_PEN_IDX]), (pyArg)))) {
            |                                                                                                                                 ^~~~~~~~~~~~~~~~~~~~~
            |                                                                                                                                 SBK_SHAREDPTR_OBJ_IDX
      /home/milian/projects/qt5/src/pyside-setup/pyside3d_build/py3.7-qt5.12.4-64bit-debug/shiboken2/tests/otherbinding/other/otherobjecttype_wrapper.cpp:347:109: error: ‘SBK_SHAREDPTR_PEN_IDX’ was not declared in this scope; did you mean ‘SBK_SHAREDPTR_OBJ_IDX’?
        347 |             if (Shiboken::Conversions::isImplicitConversion(reinterpret_cast<SbkObjectType *>(SbksmartTypes[SBK_SHAREDPTR_PEN_IDX]), pythonToCpp))
            |                                                                                                             ^~~~~~~~~~~~~~~~~~~~~
            |                                                                                                             SBK_SHAREDPTR_OBJ_IDX
      gmake[2]: *** [tests/otherbinding/CMakeFiles/other.dir/build.make:115: tests/otherbinding/CMakeFiles/other.dir/other/otherobjecttype_wrapper.cpp.o] Error 1
      gmake[1]: *** [CMakeFiles/Makefile2:3574: tests/otherbinding/CMakeFiles/other.dir/all] Error 2
      gmake: *** [Makefile:141: all] Error 2
      makeobj[0]: Leaving directory `/home/milian/projects/qt5/src/pyside-setup/pyside3d_build/py3.7-qt5.12.4-64bit-debug/shiboken2'
      

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              kleint Friedemann Kleint
              milianw Milian Wolff
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes