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

Signature parser fails for default values of template types

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 5.6
    • 5.6, 5.9
    • PySide
    • None

    Description

      As manifests in https://codereview.qt-project.org/#/c/218899/ when generating the signatures for 5.11:

        File ".../pyside-setup/pyside2_build/py2.7-qt5.11.0-64bit-release/pyside2/PySide2/support/signature/parser.py", line 105, in _parse_line
      RUN 2:     name, ann = arg.split(":")
      RUN 2: ValueError: need more than 1 value to unpack
      RUN 2: 
      

      with some diagnostics:

      ../pyside-setup-dev/testenv_dev33_build/py3.6-qt5.12.0-64bit-release/pyside2/PySide2/support/signature/parser.py:120: RuntimeWarning: pyside_type_init:
      
               UNRECOGNIZED:   'QVariant >()'
               OFFENDING LINE: 'PySide2.QtNetwork.QSslConfiguration.setBackendConfig(backendConfig:QMap=QMap< QByteArray,QVariant >())'
               
        """.format(arg, line), RuntimeWarning)
      .../pyside-setup-dev/testenv_dev33_build/py3.6-qt5.12.0-64bit-release/pyside2/PySide2/support/signature/parser.py:175: RuntimeWarning: pyside_type_init:
      
              UNRECOGNIZED:   'QMap< QByteArray'
              OFFENDING LINE: 'PySide2.QtNetwork.QSslConfiguration.setBackendConfig(backendConfig:QMap=QMap< QByteArray,QVariant >())'
              
        """.format(thing, line), RuntimeWarning)
      

      that is, when splitting the argument list:

      void setBackendConfig(const QMap<QByteArray, QVariant> &backendConfig = QMap<QByteArray, QVariant>());
      

      by comma, it sees ", QVariant>" as an argument (sources/pyside2/PySide2/support/signature/parser.py:105).

      Attachments

        Issue Links

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

          Activity

            People

              ctismer Christian Tismer
              kleint Friedemann Kleint
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes