Skip to content

Qt5 Support (V2) - DO NOT MERGE! - #171

Closed
corranwebster wants to merge 41 commits into
masterfrom
feature/qt5
Closed

corranwebster wants to merge 41 commits into
masterfrom
feature/qt5

Conversation

@corranwebster

@corranwebster corranwebster commented Oct 12, 2015 •

Copy link
Copy Markdown
Contributor

Keeping this around for potential future move from Qt4 API to Qt5 API, but needs work based on what we ended up doing for #264.

See enthought/traitsui#242

These will probably need to be worked on in tandem to get the tests working.

@corranwebster

Copy link
Copy Markdown
Contributor Author

@geggo Looks like there is an issue that QItemSelection has moved from QtGui to QtCore in the 4 to 5 shift. This is causing test failures in TraitsUI.

I think the fix is conditionally import it into pyface.qt.QtCore when using Qt4.

This provides forward compatibility for Qt4 to Qt5 for the move of
QItemSelection between QtGui and QtCore.
@corranwebster

Copy link
Copy Markdown
Contributor Author

Additional to-do: check changed QFileDialog methods. Looks safe.

@codecov-io

codecov-io commented Apr 25, 2016 •

Copy link
Copy Markdown

Current coverage is 46.59% (diff: 65.93%)

Merging #171 into master will increase coverage by 0.09%

@@             master       #171   diff @@
==========================================
  Files           283        286     +3   
  Lines         19065      19122    +57   
  Methods           0          0          
  Messages          0          0          
  Branches       3085       3097    +12   
==========================================
+ Hits           8864       8909    +45   
- Misses         9803       9808     +5   
- Partials        398        405     +7   

Powered by Codecov. Last update 39db257...ebb7dbb

@pankajp

pankajp commented Sep 15, 2016

Copy link
Copy Markdown
Contributor

I have a different idea about Qt5 support in pyface. With this PR, a lot of code woul need to be changed significantly to support Qt5. I propose that we implement a new pyface.qt5 subpackage which would mimic the Qt5 api, and keep the existing pyface.qt provide the Qt4 api (including whatever Qt4 api needs to be compatible ).

When using Qt5, pyface.qt would pull in all relevant imports needed to mimic the Qt4 api (ex import all things from QtGui and QtWidgets into pyface.qt.QtGui module.

When using Qt4, pyface.qt5 would pull in all relevant imports into corresponding Qt5 api (ex import everything from QtGui into both pyface.qt5.QtGui and pyface.qt5.QtWidgets modules).

That way, applications can decide to incrementally move from qt4 to qt5 api, and components using the different parts could still run together

@corranwebster

corranwebster commented Sep 15, 2016 •

Copy link
Copy Markdown
Contributor Author

@pankajp that suggestion has some merit. The advantages I see are:

  • you can have a "clean" qt5 api for the future,
  • you are signalling the intent of your code

The downsides:

  • code written to qt4 API will persist, and be copied without thinking,
  • trying to make current code "just work" with the qt5 API without modification may lead to subtle bugs
  • more effort in upgrading code to the qt5 API properly (you need to touch every pyside.qt import)

If we do this, I can see the point of having a mirror pyside.qt4 API.

However, my immediate concern is just getting the CI tests to pass reliably with a decent set of coverage.

@corranwebster

Copy link
Copy Markdown
Contributor Author

Note, although these are passing, I'm not sure I trust that the results of the Python 3.5 + pyqt5 test right now.

@corranwebster corranwebster mentioned this pull request Mar 10, 2017
1 task done
@corranwebster

Copy link
Copy Markdown
Contributor Author

This has been superseded by #264.

Keeping this around as we would like to move from Qt4 API to Qt5 API in the internal code, and this has the basics of making that move.

@corranwebster corranwebster changed the title Qt5 Support (V2) Qt5 Support (V2) - DO NOT MERGE! Mar 24, 2017
@corranwebster

Copy link
Copy Markdown
Contributor Author

Closing to avoid confusion - Qt5 support is in master.

@corranwebster
corranwebster deleted the feature/qt5 branch June 14, 2019 07:52
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.

4 participants