diff options
author | Pierre Rossi <pierre.rossi@digia.com> | 2014-04-11 18:46:40 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-04-29 16:37:37 +0200 |
commit | 4da1db8fb60b444dc112b41804a3ac7480197bd2 (patch) | |
tree | 9d49ec3bfb6a8703ee23fb6122c025862db39a79 /src/webenginewidgets/api/qwebenginepage.cpp | |
parent | 59ec1beac8b2c0931efb9a78ee696a8e150e9a6f (diff) |
Add a way of using UI dialogs for authorization
We could use this to prompt the user for various feature permissions
that we are not ready to expose in our API.
Change-Id: If6e6a16aca4142b0564121dfc7677b7c4996f742
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
Diffstat (limited to 'src/webenginewidgets/api/qwebenginepage.cpp')
-rw-r--r-- | src/webenginewidgets/api/qwebenginepage.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/webenginewidgets/api/qwebenginepage.cpp b/src/webenginewidgets/api/qwebenginepage.cpp index 6fcababbf..ec0c0224d 100644 --- a/src/webenginewidgets/api/qwebenginepage.cpp +++ b/src/webenginewidgets/api/qwebenginepage.cpp @@ -594,6 +594,9 @@ void QWebEnginePagePrivate::javascriptDialog(QSharedPointer<JavaScriptDialogCont if (accepted) controller->textProvided(promptResult); break; + case InternalAuthorizationDialog: + accepted = (QMessageBox::question(view, controller->title(), controller->message(), QMessageBox::Yes, QMessageBox::No) == QMessageBox::Yes); + break; default: Q_UNREACHABLE(); } |