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

const& shared pointers arguments generate broken code

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Done
    • Affects Version/s: 5.12.3
    • Fix Version/s: 5.12.4, 5.13.1
    • Component/s: Shiboken
    • Labels:
      None
    • Platform/s:
      Linux/X11
    • Commits:
      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. 0001-WIP-Reproduce-PYSIDE-1016.patch
          4 kB
        2. pyside1016_diag.diff
          2 kB
        3. pyside1016_log.txt
          2 kB
        4. reproduce.patch
          3 kB

          Issue Links

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

            Activity

              People

              • Assignee:
                kleint Friedemann Kleint
                Reporter:
                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