-
Notifications
You must be signed in to change notification settings - Fork 541
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move to typed enums from QtCore.Qt #5548
Open
Vekhir
wants to merge
33
commits into
OpenShot:develop
Choose a base branch
from
Vekhir:use-pyqt6-typed-enums
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
Merge conflicts have been detected on this PR, please resolve. |
PyQt6 requires typed enums; they are already available in PyQt5.
PyQt6 requires typed enums; they are already available in PyQt5.
PyQt6 requires typed enums; they are already available in PyQt5.
PyQt6 requires typed enums; they are already available in PyQt5.
PyQt6 requires typed enums; they are already available in PyQt5.
PyQt6 requires typed enums; they are already available in PyQt5.
PyQt6 requires typed enums; they are already available in PyQt5.
PyQt6 requires typed enums; they are already available in PyQt5.
PyQt6 requires typed enums; they are already available in PyQt5.
PyQt6 requires typed enums; they are already available in PyQt5.
PyQt6 requires typed enums; they are already available in PyQt5.
PyQt6 requires typed enums; they are already available in PyQt5.
PyQt6 requires typed enums; they are already available in PyQt5.
PyQt6 requires typed enums; they are already available in PyQt5.
PyQt6 requires typed enums; they are already available in PyQt5.
PyQt6 requires typed enums; they are already available in PyQt5.
PyQt6 requires typed enums; they are already available in PyQt5.
PyQt6 requires typed enums; they are already available in PyQt5.
PyQt6 requires typed enums; they are already available in PyQt5.
PyQt6 requires typed enums; they are already available in PyQt5.
PyQt6 requires typed enums; they are already available in PyQt5.
PyQt6 requires typed enums; they are already available in PyQt5.
PyQt6 requires typed enums; they are already available in PyQt5.
PyQt6 requires typed enums; they are already available in PyQt5.
PyQt6 requires typed enums; they are already available in PyQt5.
PyQt6 requires typed enums; they are already available in PyQt5.
PyQt6 requires typed enums; they are already available in PyQt5.
PyQt6 requires typed enums; they are already available in PyQt5.
PyQt6 requires typed enums; they are already available in PyQt5.
PyQt6 requires typed enums; they are already available in PyQt5.
PyQt6 requires typed enums; they are already available in PyQt5.
PyQt6 requires typed enums; they are already available in PyQt5.
PyQt6 requires typed enums; they are already available in PyQt5.
Vekhir
force-pushed
the
use-pyqt6-typed-enums
branch
from
July 24, 2024 12:48
aaf10e2
to
60ea2f2
Compare
@jonoomph Is there something that prevents this PR from being merged? It's a small step toward PyQt6 support and referencing the scope of the enums is recommended by PyQt5 aswell. |
Merge conflicts have been detected on this PR, please resolve. |
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.
The codebase currently accesses the fields of
QtCore.Qt
directly, e.g.Qt.white
.Qt.white
is part of theQt.GlobalColor
enum, so can also be accessed viaQt.GlobalColor.white
. The latter access method is mandatory with PyQt6 to achieve better type safety.The full list of enums is available at https://www.riverbankcomputing.com/static/Docs/PyQt5/api/qtcore/qt.html. I've checked for each and every literal name whether it is used in OpenShot, and then committed the changes by enum type. The commit header and message are essentially the same each time, mostly noting the enum type contained within it and a note that it's required for PyQt6 compatibility. The split into 33 commits is supposed to make the code review easier; if you'd rather like a single commit, I can squash them.
The idea is more thoroughly explained in #4833. This PR is a subset of the changes there - this is by no means complete. I've tried to keep the changes as small and simple as possible, being basically find and replace.
Feedback and comments are appreciated.
-- Vekhir