summaryrefslogtreecommitdiffstats
path: root/examples/webenginewidgets
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2018-07-25 08:02:07 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-07-29 10:34:00 +0000
commit707db02dcf0252f3a53ea327dedc2c4bd52b4037 (patch)
tree5430fa4ae52a4c679f8eb897e38fa093eec85885 /examples/webenginewidgets
parent83d01d328e2fcd8c0d1632a85704336c2411ce9b (diff)
Fix simplebrowser build without ssl
Change-Id: I30dd5d438d9c17a1b96e858bf00cafdcf8d26544 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'examples/webenginewidgets')
-rw-r--r--examples/webenginewidgets/simplebrowser/webpage.cpp4
-rw-r--r--examples/webenginewidgets/simplebrowser/webpage.h2
2 files changed, 6 insertions, 0 deletions
diff --git a/examples/webenginewidgets/simplebrowser/webpage.cpp b/examples/webenginewidgets/simplebrowser/webpage.cpp
index 353361e4d..1859bad97 100644
--- a/examples/webenginewidgets/simplebrowser/webpage.cpp
+++ b/examples/webenginewidgets/simplebrowser/webpage.cpp
@@ -66,7 +66,9 @@ WebPage::WebPage(QWebEngineProfile *profile, QObject *parent)
connect(this, &QWebEnginePage::featurePermissionRequested, this, &WebPage::handleFeaturePermissionRequested);
connect(this, &QWebEnginePage::proxyAuthenticationRequired, this, &WebPage::handleProxyAuthenticationRequired);
connect(this, &QWebEnginePage::registerProtocolHandlerRequested, this, &WebPage::handleRegisterProtocolHandlerRequested);
+#if QT_CONFIG(ssl)
connect(this, &QWebEnginePage::selectClientCertificate, this, &WebPage::handleSelectClientCertificate);
+#endif
}
bool WebPage::certificateError(const QWebEngineCertificateError &error)
@@ -195,8 +197,10 @@ void WebPage::handleRegisterProtocolHandlerRequested(QWebEngineRegisterProtocolH
}
//! [registerProtocolHandlerRequested]
+#if QT_CONFIG(ssl)
void WebPage::handleSelectClientCertificate(QWebEngineClientCertSelection selection)
{
// Just select one.
selection.select(selection.certificates().at(0));
}
+#endif
diff --git a/examples/webenginewidgets/simplebrowser/webpage.h b/examples/webenginewidgets/simplebrowser/webpage.h
index 9c33d82df..72cea5304 100644
--- a/examples/webenginewidgets/simplebrowser/webpage.h
+++ b/examples/webenginewidgets/simplebrowser/webpage.h
@@ -69,7 +69,9 @@ private slots:
void handleFeaturePermissionRequested(const QUrl &securityOrigin, Feature feature);
void handleProxyAuthenticationRequired(const QUrl &requestUrl, QAuthenticator *auth, const QString &proxyHost);
void handleRegisterProtocolHandlerRequested(QWebEngineRegisterProtocolHandlerRequest request);
+#if QT_CONFIG(ssl)
void handleSelectClientCertificate(QWebEngineClientCertSelection clientCertSelection);
+#endif
};
#endif // WEBPAGE_H