--- a/eric7/QScintilla/Shell.py Sat Sep 25 18:08:10 2021 +0200 +++ b/eric7/QScintilla/Shell.py Sat Sep 25 18:12:48 2021 +0200 @@ -277,7 +277,7 @@ self.__setHistoryIndex() # remove obsolete shell histories (Python and Ruby) for clientType in ["Python", "Ruby"]: - Preferences.Prefs.settings.remove("Shell/Histories/" + clientType) + Preferences.getSettings().remove("Shell/Histories/" + clientType) # clear QScintilla defined keyboard commands # we do our own handling through the view manager @@ -436,12 +436,12 @@ # get the font for style 0 and set it as the default font key = 'Scintilla/{0}/style0/font'.format(self.lexer_.language()) - fdesc = Preferences.Prefs.settings.value(key) + fdesc = Preferences.getSettings().value(key) if fdesc is not None: font = QFont([fdesc[0]], int(fdesc[1])) self.lexer_.setDefaultFont(font) self.setLexer(self.lexer_) - self.lexer_.readSettings(Preferences.Prefs.settings, "Scintilla") + self.lexer_.readSettings(Preferences.getSettings(), "Scintilla") if self.lexer_.hasSubstyles(): self.lexer_.readSubstyles(self) @@ -689,7 +689,7 @@ self.clientType and self.__historyStyle == ShellHistoryStyle.WINDOWSSTYLE ): - idx = int(Preferences.Prefs.settings.value( + idx = int(Preferences.getSettings().value( "Shell/HistoryIndexes/" + self.clientType, -1)) if idx >= len(self.__history): idx = -1 @@ -704,7 +704,7 @@ self.clientType and self.__historyStyle == ShellHistoryStyle.WINDOWSSTYLE ): - Preferences.Prefs.settings.setValue( + Preferences.getSettings().setValue( "Shell/HistoryIndexes/" + self.clientType, self.__histidx) def __isHistoryIndexValid(self): @@ -731,7 +731,7 @@ @param clientType type of the debug client (string) """ - hl = Preferences.Prefs.settings.value("Shell/Histories/" + clientType) + hl = Preferences.getSettings().value("Shell/Histories/" + clientType) if hl is not None: self.__historyLists[clientType] = hl[-self.__maxHistoryEntries:] else: @@ -753,7 +753,7 @@ @param clientType type of the debug client (string) """ if clientType in self.__historyLists: - Preferences.Prefs.settings.setValue( + Preferences.getSettings().setValue( "Shell/Histories/" + clientType, self.__historyLists[clientType]) @@ -815,11 +815,11 @@ """ Public method to clear all available histories and sync them. """ - Preferences.Prefs.settings.beginGroup("Shell/Histories") - for clientType in Preferences.Prefs.settings.childKeys(): + Preferences.getSettings().beginGroup("Shell/Histories") + for clientType in Preferences.getSettings().childKeys(): self.__historyLists[clientType] = [] self.saveHistory(clientType) - Preferences.Prefs.settings.endGroup() + Preferences.getSettings().endGroup() self.clearHistory()