Merged
Conversation
A number of enum values in Qt are actually aliases and one need to inspect the enum members to find the names under which some values are aliased.
dalthviz
reviewed
Jan 28, 2022
Member
dalthviz
left a comment
There was a problem hiding this comment.
Thank you @MatthieuDartiailh for helping with this!
Could you remove also in this PR the manual aliases done here?:
Lines 51 to 53 in 74dd309
With this change I think those lines are now unnecessary.
Contributor
Author
|
Done |
dalthviz
approved these changes
Jan 28, 2022
Member
dalthviz
left a comment
There was a problem hiding this comment.
Thank you @MatthieuDartiailh ! 👍
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A number of enum values in QT can be accessed through aliases. For example, QSlider.TicksPosition has both TicksAbove and TicksLeft and TicksLeft is an alias of TicksAbove.
Currently, enums are only iterated which yield their variants but miss the existence of aliases. This patch explicitly iterate over the enum members to catch all aliases. Tests are included, both for TicksLeft which is a documented alias (https://doc.qt.io/qt-6/qslider.html#TickPosition-enum) and SC_SliderGroove which happens to have the same value as SC_ScrollBarAddLine and hence appears as an alias.