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

connectNotify doesn't exist when using snake_case feature

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • 5.15.4
    • 6.0.0
    • PySide
    • None
    • macOS Big Sur (Intel)
    • macOS
    • d158720ec4dd3fe8623faaf9afcb2e7f9f368e51 (pyside/pyside-setup/dev) b7110476aed3216d6c9631dc67231ac97c576887 (pyside/tqtc-pyside-setup/tqtc/lts-5.15) 84eaf8c056b01f91cbd29ff5a363829710688510 (pyside/pyside-setup/6.0)

    Description

      After activating new snake_case feature some internal code still trying to access camelCase attributes (I suppose) which doesn't exist anymore. When disabling the feature (and, of course, renaming methods back to camelCase), the problem has gone. Snippet to reproduce:

      import sys
      
      from PySide6.QtCore import QStringListModel
      
      from PySide6.QtGui import QGuiApplication
      from PySide6.QtQml import QQmlApplicationEngine
      
      # noinspection PyUnresolvedReferences
      from __feature__ import snake_case, true_property
      
      
      def create_app():
          app = QGuiApplication(sys.argv)
          engine = QQmlApplicationEngine(parent=app)
          some_list_model = QStringListModel(parent=engine)
          engine.root_context().set_context_property('someListModel', some_list_model)
          return app
      
      def main():
          app = create_app()
          return app.exec_()
      
      if __name__ == '__main__':
          sys.exit(main())
      

      Traceback is (last line):

          engine.root_context().set_context_property('someListModel', some_list_model)
      AttributeError: 'PySide6.QtCore.QStringListModel' object has no attribute 'connectNotify'

      Attachments

        1. pyside1478_camelcase_log.txt
          2 kB
          Friedemann Kleint
        2. pyside1478_camelcase.py
          0.5 kB
          Friedemann Kleint
        3. pyside1478_diag.diff
          1 kB
          Friedemann Kleint
        4. pyside1478_libshiboken_diag.diff
          2 kB
          Friedemann Kleint
        5. pyside1478_stack.txt
          33 kB
          Friedemann Kleint
        6. pyside1478.py
          0.6 kB
          Friedemann Kleint
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            ctismer Christian Tismer
            ussserrr Андрей Чуфырев
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: