src/eric7/QScintilla/ShellWindow.py

branch
eric7
changeset 10069
435cc5875135
parent 9695
ad962e9b904d
child 10132
66c11ab8fefd
diff -r 7febcdccb2a1 -r 435cc5875135 src/eric7/QScintilla/ShellWindow.py
--- a/src/eric7/QScintilla/ShellWindow.py	Thu May 25 11:12:05 2023 +0200
+++ b/src/eric7/QScintilla/ShellWindow.py	Thu May 25 19:51:47 2023 +0200
@@ -10,7 +10,15 @@
 import os
 
 from PyQt6.Qsci import QsciScintilla
-from PyQt6.QtCore import QCoreApplication, QPoint, QProcess, QSignalMapper, QSize, Qt
+from PyQt6.QtCore import (
+    QCoreApplication,
+    QPoint,
+    QProcess,
+    QSignalMapper,
+    QSize,
+    Qt,
+    pyqtSlot,
+)
 from PyQt6.QtGui import QAction, QKeySequence
 from PyQt6.QtWidgets import QApplication, QDialog, QVBoxLayout, QWhatsThis, QWidget
 
@@ -28,7 +36,7 @@
 from eric7.VirtualEnv.VirtualenvManager import VirtualenvManager
 
 from .APIsManager import APIsManager
-from .Shell import Shell
+from .Shell import Shell, ShellHistoryStyle
 
 
 class ShellWindow(EricMainWindow):
@@ -422,11 +430,7 @@
         ####################################################################
 
         self.esm = QSignalMapper(self)
-        try:
-            self.esm.mappedInt.connect(self.__shell.editorCommand)
-        except AttributeError:
-            # pre Qt 5.15
-            self.esm.mapped[int].connect(self.__shell.editorCommand)
+        self.esm.mappedInt.connect(self.__shell.editorCommand)
 
         self.editorActGrp = createActionGroup(self)
 
@@ -1502,6 +1506,8 @@
         self.__sbZoom.valueChanged.connect(self.__zoomTo)
         self.__sbZoom.setValue(0)
 
+    # TODO: add code to select the shell history style
+    @pyqtSlot(ShellHistoryStyle)
     def __historyStyleChanged(self, historyStyle):
         """
         Private slot to handle a change of the shell history style.

eric ide

mercurial