summaryrefslogtreecommitdiff
path: root/examples/webengine/customdialogs/WebView.qml
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2021-07-20 09:29:17 +0200
committerMichal Klocek <michal.klocek@qt.io>2021-08-06 09:08:45 +0200
commitb18e707c4824004487e968fc95e8943dc3527506 (patch)
tree4946625af70e581e425a345af1989669c333aea7 /examples/webengine/customdialogs/WebView.qml
parent4ff41d948059ebd014c4bb3a094cf0e21dd74ada (diff)
downloadqtwebengine-b18e707c4824004487e968fc95e8943dc3527506.tar.gz
Fix custom dialog example
Fix issue where ERR_UNEXPECTED_PROXY_AUTH error page is shown on proxy dialog request. * use qt.io url as dummy, otherwise CONNECT and GET requests to localhost end in proxy unexpected error. * in case of invalid authentication reload url instead of showing error page. * adjust app default width and height so dialog box is visible. Pick-to: 6.2 Change-Id: I16a1dade73f7cb0f4f6da48b7d6902a2e7a57b5b Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'examples/webengine/customdialogs/WebView.qml')
-rw-r--r--examples/webengine/customdialogs/WebView.qml8
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/webengine/customdialogs/WebView.qml b/examples/webengine/customdialogs/WebView.qml
index 5d388e467..61bbea87e 100644
--- a/examples/webengine/customdialogs/WebView.qml
+++ b/examples/webengine/customdialogs/WebView.qml
@@ -52,7 +52,7 @@ import QtQuick
import QtWebEngine
WebEngineView {
-
+ id: view
url: "qrc:/index.html"
property bool useDefaultDialogs: true
signal openForm(var form)
@@ -115,9 +115,11 @@ WebEngineView {
}
onAuthenticationDialogRequested: function(request) {
- if (useDefaultDialogs)
+ if (useDefaultDialogs) {
+ // do not show proxy error page
+ view.url = "qrc:/index.html"
return;
-
+ }
request.accepted = true;
openForm({item: Qt.resolvedUrl("forms/Authentication.qml"),
properties: {"request": request}});