-
Notifications
You must be signed in to change notification settings - Fork 85
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
Support qt toolkit name for Qt5 and Qt4 #1436
Conversation
instead of only supporting qt4 as the toolkit name for PyQt4 modified: traits/etsconfig/etsconfig.py modified: traits/etsconfig/tests/test_etsconfig.py
traits/etsconfig/etsconfig.py
Outdated
@@ -314,7 +314,7 @@ def _get_kiva_backend(self): | |||
self._kiva_backend = ( | |||
"quartz" if sys.platform == "darwin" else "image" | |||
) | |||
elif self.toolkit == "qt4": | |||
elif self.toolkit.startswith("qt"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we stick to a whitelist of toolkits we allow? (Probably just "qt4"
and "qt"
.) Otherwise we risk having to support everything starting with "qt" for evermore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Though I guess it's a moot point, because the fall-through branch will pick "image"
anyway.)
Just to be clear, this PR doesn't change user-visible behaviour at all, right? |
@rahulporuri Ping! Could you rebut or confirm my assertion that this doesn't change user-visible behaviour in any way? If it doesn't, then it would be good to explain what the benefit of the PR is. |
The main intention here was to explicitly set the backend to
My understanding is that yes, this PR does not change user-visible behavior in anyway. Previously, if So, this PR doesn't fix any issues or make any behavioral changes - it just makes existing code more explicit. I'm okay if we decide that this change isn't warranted and choose to close this PR instead of merging it. |
instead explicitly check if the toolkit is qt4 or qt. changes based on PR review comment. modified: traits/etsconfig/etsconfig.py
This PR updates
ETSConfig
to support the use ofqt
as the toolkit name for Qt4 and Qt5 instead of only supportingqt4
as the toolkit name for Qt4. This is in line with similar changes we have made in other ETS packages e.g. traitsui, enable.Checklist
Update API reference (docs/source/traits_api_reference
)Update User manual (docs/source/traits_user_manual
)Update type annotation hints intraits-stubs