Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

FIX: support Qt 5.15#17565

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
QuLogic merged 3 commits intomatplotlib:masterfromtacaswell:fix_new_qt
Jun 6, 2020
Merged

Conversation

tacaswell
Copy link
Member

PR Summary

  • QPainter.drawLine is now picky about float vs int
  • be more careful that we close the Qpainter out

I may need to check the exact version we need this for more carefully. May be a pyqt, not Qt change.

 - QPainter.drawLine is now picky about float vs int - be more careful that we close the Qpainter out
@tacaswelltacaswell added this to thev3.2.2 milestoneJun 4, 2020
No need for map when a single list comprehension will do.Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
@QuLogic
Copy link
Member

Strange, the.end() docs say you don't need to call it as it's done in the destructor, but many examples still seem to show it.

@@ -486,7 +486,7 @@ def drawRectangle(self, rect):
# Draw the zoom rectangle to the QPainter. _draw_rect_callback needs
# to be called at the end of paintEvent.
if rect is not None:
x0, y0, w, h = [pt / self._dpi_ratio for pt in rect]
x0, y0, w, h = [int(pt / self._dpi_ratio) for pt in rect]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Or round? c.f.#15656 (comment)

I'm not sure myself. I think I tested 15656 with round but it caused some test failures. Did not have time to investigate.

Maybeint() is good enough to fix this if we don't have the capacity to work outround vs.int.

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

We have looked at moving more things toround in other places (#8265) and it also caused failures. I am inclined to stay with int here as I suspect that is what is used to be doing under the hood (it is just complaining about in now).

On the other hand, this is in drawing the zoom box so it probably doesn't really matter?

timhoffm reacted with thumbs up emoji
Copy link
Member

@timhoffmtimhoffm left a comment
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Modulo theint vs.round issue. But that's not a blocker.

@QuLogic
Copy link
Member

I may need to check the exact version we need this for more carefully. May be a pyqt, not Qt change.

Are you okay to merge now, or still wait?

@tacaswell
Copy link
MemberAuthor

I'm OK to merge, the version checking would only be to mkae the comit message more accurate.

@QuLogicQuLogic merged commit8d49327 intomatplotlib:masterJun 6, 2020
@lumberbot-app
Copy link

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
$ git checkout v3.2.x$ git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
$ git cherry-pick -m1 8d49327d9d48c5a7ca3d3aa3071db5facac63b16
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
$ git commit -am 'Backport PR #17565: FIX: support Qt 5.15'
  1. Push to a named branch :
git push YOURFORK v3.2.x:auto-backport-of-pr-17565-on-v3.2.x
  1. Create a PR against branch v3.2.x, I would have named this PR:

"Backport PR#17565 on branch v3.2.x"

And apply the correct labels and milestones.

Congratulation you did some good work ! Hopefully your backport PR will be tested by the continuous integration and merged soon!

If these instruction are inaccurate, feel free tosuggest an improvement.

@tacaswelltacaswell deleted the fix_new_qt branchJune 8, 2020 21:53
tacaswell pushed a commit to tacaswell/matplotlib that referenced this pull requestJun 8, 2020
Merge pull requestmatplotlib#17565 from tacaswell/fix_new_qtFIX: support Qt 5.15Conflicts:lib/matplotlib/backends/backend_qt5.py          - code was very different, int cast done differently.
QuLogic added a commit that referenced this pull requestJun 9, 2020
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@QuLogicQuLogicQuLogic approved these changes

@timhoffmtimhoffmtimhoffm approved these changes

Assignees
No one assigned
Labels
Projects
None yet
Milestone
v3.2.2
Development

Successfully merging this pull request may close these issues.

3 participants
@tacaswell@QuLogic@timhoffm

[8]ページ先頭

©2009-2025 Movatter.jp