Skip to content
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

Convert enums to Qt6 style #20364

Open
wants to merge 16 commits into
base: 5.x
Choose a base branch
from
Open

Convert enums to Qt6 style #20364

wants to merge 16 commits into from

Conversation

oscargus
Copy link
Contributor

Description of Changes

In Qt6 the enums are no longer located directly under QtCore.Qt. This is fully compatible with Qt5, so a small step towards easier Qt6 support.

This would convert most of them (probably some are still missing).

I went with separate commits to make it easier to review, but let me know if it is preferred to squash them.

(I do not understand what happened with scripts/spyder.bat. I did my best to revert the "change" locally, but for unknown reasons, my git client thought that it was modified...)

  • Wrote at least one-line docstrings (for any new functions)
  • Added unit test(s) covering the changes (if testable)
  • Included a screenshot or animation (if affecting the UI, see Licecap)

Issue(s) Resolved

Affirmation

By submitting this Pull Request or typing my (user)name below,
I affirm the Developer Certificate of Origin
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.

I certify the above statement is true and correct:
oscargus/Oscar Gustafsson

@oscargus
Copy link
Contributor Author

oscargus commented Jan 12, 2023

I realize that I should have kept external-deps out of it... Problem with automatic search and replace...

I guess the easiest way is to revert those files and squash the commits. Maybe that isn't much of a difference as it is a quite hefty review anyway...

@ccordoba12
Copy link
Member

Hey @oscargus, thanks for your contribution. However, I think this is handled automatically by QtPy, right @dalthviz?

@dalthviz
Copy link
Member

Checking I think QtPy should be taking care of this with the enums promotion to allow unscoped access even with PyQt6 at https://github.com/spyder-ide/qtpy/blob/a94438f50942c23031776d8698883661eeb8e954/qtpy/QtCore.py#L70-L75

Thinking, maybe this be related with spyder-ide/qtpy#364 ? From what I have been able to check seems like PyQt6 is the only binding that dropped support for unscoped enum access. Maybe @oscargus do you have more info about the state of that or after which version the Qt6/PySide6 projects will be dropping support for unscoped enums access?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants