diff -r 27f636beebad -r 2c730d5fd177 eric6/Preferences/ConfigurationPages/EditorLanguageTabIndentOverrideDialog.py --- a/eric6/Preferences/ConfigurationPages/EditorLanguageTabIndentOverrideDialog.py Mon Mar 01 17:48:43 2021 +0100 +++ b/eric6/Preferences/ConfigurationPages/EditorLanguageTabIndentOverrideDialog.py Tue Mar 02 17:17:09 2021 +0100 @@ -105,20 +105,23 @@ """ lang = self.languageComboBox.currentText() if lang in self.__extras: - self.buttonBox.button(QDialogButtonBox.Ok).setEnabled( - bool(self.pygmentsLexerCombo.currentText())) + self.buttonBox.button( + QDialogButtonBox.StandardButton.Ok).setEnabled( + bool(self.pygmentsLexerCombo.currentText())) else: - self.buttonBox.button(QDialogButtonBox.Ok).setEnabled( - bool(lang)) + self.buttonBox.button( + QDialogButtonBox.StandardButton.Ok).setEnabled( + bool(lang)) - @pyqtSlot(str) - def on_languageComboBox_currentIndexChanged(self, lang): + @pyqtSlot(int) + def on_languageComboBox_currentIndexChanged(self, index): """ Private slot to handle the selection of a language. - @param lang selected language - @type str + @param index index of the current item + @type int """ + lang = self.languageComboBox.itemText(index) if lang in self.__extras: self.pygmentsLexerCombo.setEnabled(True) self.pygmentsLabel.setEnabled(True) @@ -128,12 +131,12 @@ self.__updateOkButton() - @pyqtSlot(str) - def on_pygmentsLexerCombo_currentIndexChanged(self, lang): + @pyqtSlot(int) + def on_pygmentsLexerCombo_currentIndexChanged(self, index): """ Private slot to handle the selection of a language. - @param lang selected language - @type str + @param index index of the current item + @type int """ self.__updateOkButton()