--- a/eric6/E5Network/E5SslCertificateSelectionDialog.py Mon Mar 01 17:48:43 2021 +0100 +++ b/eric6/E5Network/E5SslCertificateSelectionDialog.py Tue Mar 02 17:17:09 2021 +0100 @@ -27,7 +27,7 @@ """ Class implementing a dialog to select a SSL certificate. """ - CertRole = Qt.UserRole + 1 + CertRole = Qt.ItemDataRole.UserRole + 1 def __init__(self, certificates, parent=None): """ @@ -62,7 +62,7 @@ self.certificatesTree.expandAll() for i in range(self.certificatesTree.columnCount()): self.certificatesTree.resizeColumnToContents(i) - self.certificatesTree.sortItems(0, Qt.AscendingOrder) + self.certificatesTree.sortItems(0, Qt.SortOrder.AscendingOrder) def __createCaCertificateEntry(self, cert): """ @@ -73,9 +73,11 @@ """ # step 1: extract the info to be shown organisation = Utilities.decodeString( - ", ".join(cert.subjectInfo(QSslCertificate.Organization))) + ", ".join(cert.subjectInfo( + QSslCertificate.SubjectInfo.Organization))) commonName = Utilities.decodeString( - ", ".join(cert.subjectInfo(QSslCertificate.CommonName))) + ", ".join(cert.subjectInfo( + QSslCertificate.SubjectInfo.CommonName))) if organisation is None or organisation == "": organisation = self.tr("(Unknown)") if commonName is None or commonName == "": @@ -85,7 +87,7 @@ # step 2: create the entry items = self.certificatesTree.findItems( organisation, - Qt.MatchFixedString | Qt.MatchCaseSensitive) + Qt.MatchFlag.MatchFixedString | Qt.MatchFlag.MatchCaseSensitive) if len(items) == 0: parent = QTreeWidgetItem(self.certificatesTree, [organisation]) parent.setFirstColumnSpanned(True)