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

const& shared pointers arguments generate broken code

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • 5.12.4, 5.13.1
    • 5.12.3
    • Shiboken
    • None
    • Linux/X11
    • fd126b28e1d9b02ea16c813bc392461bdb05bd1d (pyside-setup/5.12, 6.6.2019, 5.12.4) d21b58ef69559f4a0412f5129175b31e4450d55b (pyside/pyside-setup/5.12)

    Description

      I'll try to create a full MWE later, but wanted to report this early:

       

      namespace Foo {
      struct Bar {};
      using SharedBar = QSharedPointer<Bar>;
      struct Asdf
      {
          void take(const SharedBar& bar);
      };
      }

      This will lead to invalid code generation by shiboken:

      .../pytest_foo_python.h:80:33: error: parse error in template argument list
       template<> inline PyTypeObject* SbkType< ::const QSharedPointer< Foo::Bar > & >() { return reinterpret_cast<PyTypeObject*>(SbkPyTest_FooTypes[SBK_QSHAREDPOINTER_CONSTFOO_BAR_IDX]); }
                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      .../pytest_foo_python.h:80:33: error: template-id ‘SbkType<<expression error> >’ for ‘PyTypeObject* Shiboken::SbkType()’ does not match any template declaration
      
       

      Attachments

        1. reproduce.patch
          3 kB
        2. pyside1016_log.txt
          2 kB
        3. pyside1016_diag.diff
          2 kB
        4. 0001-WIP-Reproduce-PYSIDE-1016.patch
          4 kB

        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:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes