diff options
author | Michal Klocek <michal.klocek@theqtcompany.com> | 2016-06-13 13:29:51 +0200 |
---|---|---|
committer | Kai Koehne <kai.koehne@qt.io> | 2016-08-31 09:11:47 +0000 |
commit | 3cbe59e29a2702a2c184be10845b9bdd342c24d0 (patch) | |
tree | ef3b6555857028147b9b57948a15e18626e213da /src/webengine/plugin/plugin.cpp | |
parent | 4f3425c0d17f5f53deba78ccf6d357c1c83529f0 (diff) |
Add dialog requests to qml api
Introduce qml APIs to support custom dialogs:
* http and proxy authentication
* javascript dialogs
* file pickers
* color pickers
* form validation messages
[ChangeLog][QtWebEngine][QML] Added ability to provide custom dialogs
for HTTP and proxy authentication, JavaScript alerts, file and color
picking, and form validation messages.
Task-number: QTBUG-51190
Change-Id: I559ca59264750feb36ba7d3dba0bf0647509306d
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'src/webengine/plugin/plugin.cpp')
-rw-r--r-- | src/webengine/plugin/plugin.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/webengine/plugin/plugin.cpp b/src/webengine/plugin/plugin.cpp index 5c33086c0..0bf2e3d8e 100644 --- a/src/webengine/plugin/plugin.cpp +++ b/src/webengine/plugin/plugin.cpp @@ -41,6 +41,7 @@ #include <QtWebEngine/QQuickWebEngineProfile> #include "qquickwebenginecertificateerror_p.h" +#include "qquickwebenginedialogrequests_p.h" #include "qquickwebenginedownloaditem_p.h" #include "qquickwebenginehistory_p.h" #include "qquickwebenginefaviconprovider_p_p.h" @@ -109,6 +110,17 @@ public: qmlRegisterUncreatableType<QQuickWebEngineFullScreenRequest>(uri, 1, 1, "FullScreenRequest", tr("Cannot create a separate instance of FullScreenRequest")); + qmlRegisterUncreatableType<QQuickWebEngineAuthenticationDialogRequest>(uri, 1, 4, "AuthenticationDialogRequest", + tr("Cannot create separate instance of AuthenticationDialogRequest")); + qmlRegisterUncreatableType<QQuickWebEngineJavaScriptDialogRequest>(uri, 1, 4, "JavaScriptDialogRequest", + tr("Cannot create separate instance of JavaScriptDialogRequest")); + qmlRegisterUncreatableType<QQuickWebEngineColorDialogRequest>(uri, 1, 4, "ColorDialogRequest", + tr("Cannot create separate instance of ColorDialogRequest")); + qmlRegisterUncreatableType<QQuickWebEngineFileDialogRequest>(uri, 1, 4, "FileDialogRequest", + tr("Cannot create separate instance of FileDialogRequest")); + qmlRegisterUncreatableType<QQuickWebEngineFormValidationMessageRequest>(uri, 1, 4, "FormValidationMessageRequest", + tr("Cannot create separate instance of FormValidationMessageRequest")); + // For now (1.x import), the latest revision matches the minor version of the import. qmlRegisterRevision<QQuickWebEngineView, LATEST_WEBENGINEVIEW_REVISION>(uri, 1, LATEST_WEBENGINEVIEW_REVISION); } |