eric6/QScintilla/ShellHistoryDialog.py

changeset 8143
2c730d5fd177
parent 7923
91e843545d9a
child 8218
7c09585bd960
--- a/eric6/QScintilla/ShellHistoryDialog.py	Mon Mar 01 17:48:43 2021 +0100
+++ b/eric6/QScintilla/ShellHistoryDialog.py	Tue Mar 02 17:17:09 2021 +0100
@@ -40,9 +40,11 @@
         index = shell.getHistoryIndex()
         if index < 0 or index >= len(history):
             self.historyList.setCurrentRow(
-                self.historyList.count() - 1, QItemSelectionModel.Select)
+                self.historyList.count() - 1,
+                QItemSelectionModel.SelectionFlag.Select)
         else:
-            self.historyList.setCurrentRow(index, QItemSelectionModel.Select)
+            self.historyList.setCurrentRow(
+                index, QItemSelectionModel.SelectionFlag.Select)
         self.historyList.scrollToItem(self.historyList.currentItem())
     
     @pyqtSlot()
@@ -126,12 +128,14 @@
         self.historyList.addItems(history)
         if index < 0 or index >= len(history):
             self.historyList.setCurrentRow(
-                self.historyList.count() - 1, QItemSelectionModel.Select)
+                self.historyList.count() - 1,
+                QItemSelectionModel.SelectionFlag.Select)
         else:
-            self.historyList.setCurrentRow(index, QItemSelectionModel.Select)
+            self.historyList.setCurrentRow(
+                index, QItemSelectionModel.SelectionFlag.Select)
         self.historyList.scrollToItem(self.historyList.currentItem())
         
-        self.historyList.setFocus(Qt.OtherFocusReason)
+        self.historyList.setFocus(Qt.FocusReason.OtherFocusReason)
         
     def getHistory(self):
         """

eric ide

mercurial