[Python-modules-commits] [matplotlib] 13/16: From 655c513a5e5440014677ee5afb08b0efa39f8e16 Mon Sep 17 00:00:00 2001 From: Antony Lee <anntzer.lee at gmail.com> Date: Thu, 28 Jul 2016 19:26:02 -0700 Subject: [PATCH] Fix for PyQt5.7 support.

Sandro Tosi morph at moszumanska.debian.org
Fri Sep 2 18:52:44 UTC 2016


This is an automated email from the git hooks/post-receive script.

morph pushed a commit to branch master
in repository matplotlib.

commit 2a95e2a75f2f536c98df9695c71ddb5610993eac
Author: Sandro Tosi <morph at debian.org>
Date:   Tue Aug 30 22:01:26 2016 +0100

    From 655c513a5e5440014677ee5afb08b0efa39f8e16 Mon Sep 17 00:00:00 2001
    From: Antony Lee <anntzer.lee at gmail.com>
    Date: Thu, 28 Jul 2016 19:26:02 -0700
    Subject: [PATCH] Fix for PyQt5.7 support.
    
    Just getting rid of a slot with an incorrect signature (for which
    PyQt5.7 is more strict).
    
    Tested on PyQt5.6.1 and 5.7, PyQt4.11.4, PySide 1.2.4.
---
 lib/matplotlib/backends/backend_qt5.py | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/lib/matplotlib/backends/backend_qt5.py b/lib/matplotlib/backends/backend_qt5.py
index d89f3b9..f92c06f 100644
--- a/lib/matplotlib/backends/backend_qt5.py
+++ b/lib/matplotlib/backends/backend_qt5.py
@@ -459,18 +459,18 @@ class FigureManagerQT(FigureManagerBase):
 
         self.window._destroying = False
 
+        # add text label to status bar
+        self.statusbar_label = QtWidgets.QLabel()
+        self.window.statusBar().addWidget(self.statusbar_label)
+
         self.toolbar = self._get_toolbar(self.canvas, self.window)
         if self.toolbar is not None:
             self.window.addToolBar(self.toolbar)
-            self.toolbar.message.connect(self._show_message)
+            self.toolbar.message.connect(self.statusbar_label.setText)
             tbs_height = self.toolbar.sizeHint().height()
         else:
             tbs_height = 0
 
-        # add text label to status bar
-        self.statusbar_label = QtWidgets.QLabel()
-        self.window.statusBar().addWidget(self.statusbar_label)
-
         # resize the main window so it will display the canvas with the
         # requested size:
         cs = canvas.sizeHint()
@@ -491,10 +491,6 @@ class FigureManagerQT(FigureManagerBase):
                 self.toolbar.update()
         self.canvas.figure.add_axobserver(notify_axes_change)
 
-    @QtCore.Slot()
-    def _show_message(self, s):
-        self.statusbar_label.setText(s)
-
     def full_screen_toggle(self):
         if self.window.isFullScreen():
             self.window.showNormal()

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/matplotlib.git



More information about the Python-modules-commits mailing list