protected:
bool certificateError(const QWebEngineCertificateError &certificateError) override;
-
-private:
- QUrl _rootUrl;
};
// We need a separate class here, since we cannot simply return the same WebEnginePage object
void WebEnginePage::setUrl(const QUrl &url) {
QWebEnginePage::setUrl(url);
- _rootUrl = url;
}
-bool WebEnginePage::certificateError(const QWebEngineCertificateError &certificateError) {
- if (certificateError.error() == QWebEngineCertificateError::CertificateAuthorityInvalid &&
- certificateError.url().host() == _rootUrl.host()) {
- return true;
- }
-
+bool WebEnginePage::certificateError(const QWebEngineCertificateError &certificateError)
+{
/**
* TODO properly improve this.
* The certificate should be displayed.