src/eric7/Graphics/UMLGraphicsView.py

branch
eric7
changeset 10069
435cc5875135
parent 9695
ad962e9b904d
child 10439
21c28b0f9e41
diff -r 7febcdccb2a1 -r 435cc5875135 src/eric7/Graphics/UMLGraphicsView.py
--- a/src/eric7/Graphics/UMLGraphicsView.py	Thu May 25 11:12:05 2023 +0200
+++ b/src/eric7/Graphics/UMLGraphicsView.py	Thu May 25 19:51:47 2023 +0200
@@ -9,7 +9,15 @@
 
 import pathlib
 
-from PyQt6.QtCore import QEvent, QMarginsF, QRectF, QSignalMapper, Qt, pyqtSignal
+from PyQt6.QtCore import (
+    QEvent,
+    QMarginsF,
+    QRectF,
+    QSignalMapper,
+    Qt,
+    pyqtSignal,
+    pyqtSlot,
+)
 from PyQt6.QtGui import QAction, QPageLayout
 from PyQt6.QtPrintSupport import QPrintDialog, QPrinter, QPrintPreviewDialog
 from PyQt6.QtWidgets import QDialog, QGraphicsView, QToolBar
@@ -80,11 +88,7 @@
         Private method to initialize the view actions.
         """
         self.alignMapper = QSignalMapper(self)
-        try:
-            self.alignMapper.mappedInt.connect(self.__alignShapes)
-        except AttributeError:
-            # pre Qt 5.15
-            self.alignMapper.mapped[int].connect(self.__alignShapes)
+        self.alignMapper.mappedInt.connect(self.__alignShapes)
 
         self.deleteShapeAct = QAction(
             EricPixmapCache.getIcon("deleteShape"), self.tr("Delete shapes"), self
@@ -199,6 +203,7 @@
         else:
             self.decHeightAct.setEnabled(True)
 
+    @pyqtSlot("QList<QRectF>")
     def __sceneChanged(self, areas):
         """
         Private slot called when the scene changes.
@@ -826,7 +831,7 @@
 
         return data
 
-    def fromDict(self, version, data):
+    def fromDict(self, version, data):  # noqa: U100
         """
         Public method to populate the class with data persisted by 'toDict()'.
 

eric ide

mercurial