diff -r e9e7eca7efee -r bf71ee032bb4 src/eric7/Debugger/ExceptionsFilterDialog.py --- a/src/eric7/Debugger/ExceptionsFilterDialog.py Wed Jul 13 11:16:20 2022 +0200 +++ b/src/eric7/Debugger/ExceptionsFilterDialog.py Wed Jul 13 14:55:47 2022 +0200 @@ -17,10 +17,11 @@ """ Class implementing the exceptions filter dialog. """ + def __init__(self, excList, ignore, parent=None): """ Constructor - + @param excList list of exceptions to be edited (list of strings) @param ignore flag indicating the ignore exceptions mode (boolean) @param parent the parent widget (QWidget) @@ -28,25 +29,22 @@ super().__init__(parent) self.setupUi(self) self.setModal(True) - + self.exceptionList.addItems(excList) - + if ignore: self.setWindowTitle(self.tr("Ignored Exceptions")) - self.exceptionList.setToolTip( - self.tr("List of ignored exceptions")) - - self.okButton = self.buttonBox.button( - QDialogButtonBox.StandardButton.Ok) - + self.exceptionList.setToolTip(self.tr("List of ignored exceptions")) + + self.okButton = self.buttonBox.button(QDialogButtonBox.StandardButton.Ok) + @pyqtSlot() def on_exceptionList_itemSelectionChanged(self): """ Private slot to handle the change of the selection. """ - self.deleteButton.setEnabled( - len(self.exceptionList.selectedItems()) > 0) - + self.deleteButton.setEnabled(len(self.exceptionList.selectedItems()) > 0) + @pyqtSlot() def on_deleteButton_clicked(self): """ @@ -54,14 +52,14 @@ """ itm = self.exceptionList.takeItem(self.exceptionList.currentRow()) del itm - + @pyqtSlot() def on_deleteAllButton_clicked(self): """ Private slot to delete all exceptions of the listbox. """ while self.exceptionList.count() > 0: - itm = self.exceptionList.takeItem(0) # __IGNORE_WARNING__ + itm = self.exceptionList.takeItem(0) # __IGNORE_WARNING__ del itm @pyqtSlot() @@ -73,14 +71,14 @@ if exception: self.exceptionList.addItem(exception) self.exceptionEdit.clear() - + def on_exceptionEdit_textChanged(self, txt): """ Private slot to handle the textChanged signal of exceptionEdit. - + This slot sets the enabled status of the add button and sets the forms default button. - + @param txt the text entered into exceptionEdit (string) """ if not txt: @@ -91,11 +89,11 @@ self.okButton.setDefault(False) self.addButton.setDefault(True) self.addButton.setEnabled(True) - + def getExceptionsList(self): """ Public method to retrieve the list of exception types. - + @return list of exception types (list of strings) """ excList = []