--- a/src/eric7/WebBrowser/WebBrowserView.py Thu May 25 11:12:05 2023 +0200 +++ b/src/eric7/WebBrowser/WebBrowserView.py Thu May 25 19:51:47 2023 +0200 @@ -835,7 +835,7 @@ self.__downloadMedia, ) - def __createSelectedTextContextMenu(self, menu, hitTest): + def __createSelectedTextContextMenu(self, menu, hitTest): # noqa: U100 """ Private method to populate the context menu for selected text. @@ -1747,7 +1747,7 @@ ## Signal handlers below ########################################################################### - def __renderProcessTerminated(self, status, exitCode): + def __renderProcessTerminated(self, status, exitCode): # noqa: U100 """ Private slot handling a crash of the web page render process. @@ -1985,6 +1985,35 @@ return fileName, saveFormat + @pyqtSlot("QWebEngineClientCertificateSelection") + def __selectClientCertificate(self, clientCertificateSelection): + """ + Private slot to handle the client certificate selection request. + + @param clientCertificateSelection list of client SSL certificates + found in system's client certificate store + @type QWebEngineClientCertificateSelection + """ + from eric7.EricNetwork.EricSslCertificateSelectionDialog import ( + EricSslCertificateSelectionDialog, + ) + + certificates = clientCertificateSelection.certificates() + if len(certificates) == 0: + clientCertificateSelection.selectNone() + elif len(certificates) == 1: + clientCertificateSelection.select(certificates[0]) + else: + certificate = None + dlg = EricSslCertificateSelectionDialog(certificates, self) + if dlg.exec() == QDialog.DialogCode.Accepted: + certificate = dlg.getSelectedCertificate() + + if certificate is None: + clientCertificateSelection.selectNone() + else: + clientCertificateSelection.select(certificate) + ########################################################################### ## Miscellaneous methods below ########################################################################### @@ -2281,7 +2310,7 @@ self.__mw.tabWidget.printBrowser(browser=self) ########################################################################### - ## Methods below implement slots for Qt 5.11+ + ## Methods below implement slots for Qt 6.0 to 6.4 ########################################################################### # deprecated with Qt 6.5+ @@ -2322,39 +2351,6 @@ quotaRequest.reject() ########################################################################### - ## Methods below implement slots for Qt 5.12+ - ########################################################################### - - @pyqtSlot("QWebEngineClientCertificateSelection") - def __selectClientCertificate(self, clientCertificateSelection): - """ - Private slot to handle the client certificate selection request. - - @param clientCertificateSelection list of client SSL certificates - found in system's client certificate store - @type QWebEngineClientCertificateSelection - """ - from eric7.EricNetwork.EricSslCertificateSelectionDialog import ( - EricSslCertificateSelectionDialog, - ) - - certificates = clientCertificateSelection.certificates() - if len(certificates) == 0: - clientCertificateSelection.selectNone() - elif len(certificates) == 1: - clientCertificateSelection.select(certificates[0]) - else: - certificate = None - dlg = EricSslCertificateSelectionDialog(certificates, self) - if dlg.exec() == QDialog.DialogCode.Accepted: - certificate = dlg.getSelectedCertificate() - - if certificate is None: - clientCertificateSelection.selectNone() - else: - clientCertificateSelection.select(certificate) - - ########################################################################### ## Methods below implement slots for Qt 6.4+ ###########################################################################