diff options
| author | Christian Tismer <tismer@stackless.com> | 2022-08-25 11:54:56 +0200 |
|---|---|---|
| committer | Christian Tismer <tismer@stackless.com> | 2022-09-01 11:47:15 +0200 |
| commit | 20729eb6ffda8771c192e1614f8e53823108cab1 (patch) | |
| tree | a0c083b1c6ef3fc0b63bef9004a01d6ff2ce880d /sources/pyside-tools/qtpy2cpp_lib/qt.py | |
| parent | edbee6b65aeafc0fb9a5cdb8d53e04e15a94edbe (diff) | |
PyEnum: Improve the handling of QKeyCombination
After turning IntEnum into Enum, a few classes need more
attention because the simple int coercion is no more
sufficient. Instead, a bit of help is necessary to make
the usage of the __or__ operator consistent, again.
On first sight, this coercion to KeyCombination looks slightly
unpythonic. But this originates in the complex matters. If you
observe what types are actually added, this is very correct.
Using the IntEnum version instead is not better. It is just
hiding the ongoings by using int, which would also allow
to combine two characters as a bad side effect.
[ChangeLog][PySide6] PyEnum now handles QKeyCombination correctly
with "|" or (deprecated) "+" operators, without falling back
to using IntEnum.
Task-number: PYSIDE-1735
Change-Id: I08b93b8b7ece75ca650f2916ec6f6f5bb711a70b
Pick-to: 6.3
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/pyside-tools/qtpy2cpp_lib/qt.py')
0 files changed, 0 insertions, 0 deletions
