enthought / enthought/traitsui
Remove added compatibility layer for QDesktopWidget.availableGeometry deprecation warnings when we drop support for old versions of pyqt5
- Dominant language
- Python
- Stars
- 306
- Forks
- 99
- PR merge metrics
- No merged PRs in 30d
Description
In #1311 we added a compatibility layer to avoid a deprecation warning when calling `QtGui.QApplication.desktop().availableGeometry()`. Namely we added a variation of the following code:
```
if QtCore.__version_info__ >= (5, 0):
_geom = QtGui.QApplication.screens()[0].availableGeometry()
else:
_geom = QtGui.QApplication.desktop().availableGeometry()
```
Once we drop support for older versions of PyQt5, this logic can be removed and we can simply call `QtGui.QApplication.screens()[0].availableGeometry()`
NOTE: There is a related issue #1316 to use Pyface code here instead. Solving that would cause this to no longer be an issue. That will be done once deprecation warnings in Pyface are fixed. See issue https://github.com/enthought/pyface/issues/718
Opening this issue just for record keeping. It should be resolved via fixing #1316 rather than addressing this issue directly.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.