aboutsummaryrefslogtreecommitdiffstats
path: root/build_scripts/utils.py
diff options
context:
space:
mode:
authorChristian Tismer <tismer@stackless.com>2022-05-23 12:33:29 +0200
committerChristian Tismer <tismer@stackless.com>2022-06-21 11:06:37 +0200
commit304582e59e63f7620f221d3a9748118479ede099 (patch)
tree52e516c29b8f7eb12036fcc374b90941db9314dd /build_scripts/utils.py
parent7eb12e4cd3be60b4aaf18530d0c927bef386e913 (diff)
PyEnum: Remove the old duplication of Enums in the enclosing scope
When implementing Python enums, the behavior of old Qt enums was copied: Every enum was also inserted into the enclosing scope. This patch removes that for two reasons: - it is inconsequent to keep an old quirk when we have all enums renewed so much - It is more consistent compared to our competitor - it is a prerequisite to implement efficient lazy initialization PROBLEM: Many constants (about 110) are no longer recognized, for instance `Qt.AlignLeft` should be `Qt.AlignmentFlag.AlignLeft`. The question is if that can be fixed easily in C++, or if the file mapping.py should get ~100 new fixes? SOLUTION: We allow the old enums, but tell nobody that they continue to work. They also are not advertized in the PYI files. [ChangeLog][PySide6] The duplication of enum values into the enclosing scope, allowing to write Qt.AlignLeft instead of Qt.Alignment.AlignLeft, is still implemented but no longer advertized in PYI files or line completion. Task-number: PYSIDE-1735 Change-Id: I79a90d08f2a5a3a069fa551e60d609ecad718239 Pick-to: 6.3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'build_scripts/utils.py')
0 files changed, 0 insertions, 0 deletions