--- a/eric6/Project/IdlCompilerOptionsDialog.py Mon Mar 01 17:48:43 2021 +0100 +++ b/eric6/Project/IdlCompilerOptionsDialog.py Tue Mar 02 17:17:09 2021 +0100 @@ -117,7 +117,8 @@ @return flag indicating that the given directory is already included @rtype bool """ - return len(self.idList.findItems(directory, Qt.MatchExactly)) > 0 + return len(self.idList.findItems( + directory, Qt.MatchFlag.MatchExactly)) > 0 @pyqtSlot() def on_idList_itemSelectionChanged(self): @@ -223,7 +224,7 @@ value = "" QTreeWidgetItem(self.dnList, [name, value]) - self.dnList.sortItems(0, Qt.AscendingOrder) + self.dnList.sortItems(0, Qt.SortOrder.AscendingOrder) def __generateDefinedNamesList(self): """ @@ -254,7 +255,8 @@ @return flag indicating that the given name is already included @rtype bool """ - return len(self.dnList.findItems(name, Qt.MatchExactly, 0)) > 0 + return len(self.dnList.findItems( + name, Qt.MatchFlag.MatchExactly, 0)) > 0 @pyqtSlot() def on_dnList_itemSelectionChanged(self): @@ -269,12 +271,12 @@ Private slot to add a 'Define Name' entry. """ dlg = IdlCompilerDefineNameDialog(parent=self) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: name, value = dlg.getData() if not self.__definedNamesContain(name): QTreeWidgetItem(self.dnList, [name, value]) - self.dnList.sortItems(0, Qt.AscendingOrder) + self.dnList.sortItems(0, Qt.SortOrder.AscendingOrder) @pyqtSlot() def on_dnDeleteButton_clicked(self): @@ -295,7 +297,7 @@ dlg = IdlCompilerDefineNameDialog( name=itm.text(0), value=itm.text(1), parent=self) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: name, value = dlg.getData() if self.__definedNamesContain(name) and itm.text(0) != name: # the entry exists already, delete the edited one @@ -304,13 +306,14 @@ del itm # change the named one - itm = self.dnList.findItems(name, Qt.MatchExactly, 0)[0] + itm = self.dnList.findItems( + name, Qt.MatchFlag.MatchExactly, 0)[0] itm.setText(1, value) else: itm.setText(0, name) itm.setText(1, value) - self.dnList.sortItems(0, Qt.AscendingOrder) + self.dnList.sortItems(0, Qt.SortOrder.AscendingOrder) ####################################################################### ## Methods implementing the 'Undefine Name' option @@ -346,7 +349,7 @@ @return flag indicating that the given name is already included @rtype bool """ - return len(self.unList.findItems(name, Qt.MatchExactly)) > 0 + return len(self.unList.findItems(name, Qt.MatchFlag.MatchExactly)) > 0 @pyqtSlot() def on_unList_itemSelectionChanged(self):