@@ -114,7 +114,7 @@ def __init__(self, parent=None):
114
114
def settingsShell (self ):
115
115
# Set Python lexer
116
116
self .setLexers ()
117
- threshold = self .settings .value ("pythonConsole/autoCompThreshold" , 2 )
117
+ threshold = self .settings .value ("pythonConsole/autoCompThreshold" , 2 , type = int )
118
118
self .setAutoCompletionThreshold (threshold )
119
119
radioButtonSource = self .settings .value ("pythonConsole/autoCompleteSource" , 'fromAPI' )
120
120
autoCompEnabled = self .settings .value ("pythonConsole/autoCompleteEnabled" , True )
@@ -169,7 +169,7 @@ def setLexers(self):
169
169
self .lexer = QsciLexerPython ()
170
170
171
171
loadFont = self .settings .value ("pythonConsole/fontfamilytext" , "Monospace" )
172
- fontSize = self .settings .value ("pythonConsole/fontsize" , 10 )
172
+ fontSize = self .settings .value ("pythonConsole/fontsize" , 10 , type = int )
173
173
174
174
font = QFont (loadFont )
175
175
font .setFixedPitch (True )
@@ -299,7 +299,7 @@ def readHistoryFile(self):
299
299
300
300
def clearHistory (self , clearSession = False ):
301
301
if clearSession :
302
- self .history = QStringList ()
302
+ self .history = []
303
303
msgText = QCoreApplication .translate ('PythonConsole' ,
304
304
'Session and file history cleared successfully.' )
305
305
self .parent .callWidgetMessageBar (msgText )
@@ -320,7 +320,7 @@ def clearHistorySession(self):
320
320
self .clearHistory (True )
321
321
322
322
def showPrevious (self ):
323
- if self .historyIndex < len (self .history ) and not self .history :
323
+ if self .historyIndex < len (self .history ) and self .history :
324
324
line , pos = self .getCursorPosition ()
325
325
selCmdLenght = len (self .text (line ))
326
326
self .setSelection (line , 4 , line , selCmdLenght )
@@ -335,7 +335,7 @@ def showPrevious(self):
335
335
#self.SendScintilla(QsciScintilla.SCI_DELETEBACK)
336
336
337
337
def showNext (self ):
338
- if self .historyIndex > 0 and not self .history :
338
+ if self .historyIndex > 0 and self .history :
339
339
line , pos = self .getCursorPosition ()
340
340
selCmdLenght = len (self .text (line ))
341
341
self .setSelection (line , 4 , line , selCmdLenght )
0 commit comments