Uploaded image for project: 'Picard'
  1. Picard
  2. PICARD-2332

Convert code to use scoped PyQt enums

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Normal Normal
    • 2.8.0rc1
    • None
    • Other
    • None

      Since PyQt 5.11 the Qt enum values are also available as scoped enums, making use of actual Python enums.

      That means instead of e.g. QtWidgets.QAbstractItemView.ExtendedSelection this value can be accessed with QtWidgets.QAbstractItemView.SelectionMode.ExtendedSelection

      In PyQt6 this scoped access is the only possible access. In order to ease the actualy PyQt6 migration we plan to do this conversion for PyQt5 in Picard 2.8.

      See https://www.riverbankcomputing.com/static/Docs/PyQt5/gotchas.html#enums

          [PICARD-2332] Convert code to use scoped PyQt enums

          GitHub Bot added a comment -

          See code changes in pull request #2035 submitted by phw.

          GitHub Bot added a comment - See code changes in pull request #2035 submitted by phw .

          Zas added a comment -

          Zas added a comment - Scripts that might help (not tested): https://github.com/qutebrowser/qutebrowser/issues/5904#issuecomment-736792450

            outsidecontext Philipp Wolfer
            outsidecontext Philipp Wolfer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package
                2.8.0rc1