summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorKirill Burtsev <kirill.burtsev@qt.io>2021-07-13 12:34:48 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-08-19 21:53:10 +0000
commita18bd92cd95d482792aacd4d164d066122ac14c6 (patch)
tree62eaf9323d7d42e7f57dd5bc92bc1b528764c30d /examples
parentadc3ebe1fb26df925a15c63cc59c0910cf63d535 (diff)
Rename quick's 'newViewRequested' to 'newWindowRequested'
Match new api within the page API. Change-Id: Ib2af2f5270f368813cecab8f1c6b7366d3b7172f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 339017523ed418a9dc48d9343e5dc63eb1f29ec1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'examples')
-rw-r--r--examples/webengine/quicknanobrowser/BrowserWindow.qml18
1 files changed, 9 insertions, 9 deletions
diff --git a/examples/webengine/quicknanobrowser/BrowserWindow.qml b/examples/webengine/quicknanobrowser/BrowserWindow.qml
index 32955e140..0da1bc043 100644
--- a/examples/webengine/quicknanobrowser/BrowserWindow.qml
+++ b/examples/webengine/quicknanobrowser/BrowserWindow.qml
@@ -571,21 +571,21 @@ ApplicationWindow {
sslDialog.enqueue(error);
}
- onNewViewRequested: function(request) {
+ onNewWindowRequested: function(request) {
if (!request.userInitiated)
console.warn("Blocked a popup window.");
- else if (request.destination === WebEngineNewViewRequest.InNewTab) {
+ else if (request.destination === WebEngineNewWindowRequest.InNewTab) {
var tab = tabBar.createTab(currentWebView.profile, true, request.requestedUrl);
- tab.acceptAsNewView(request);
- } else if (request.destination === WebEngineNewViewRequest.InNewBackgroundTab) {
+ tab.acceptAsNewWindow(request);
+ } else if (request.destination === WebEngineNewWindowRequest.InNewBackgroundTab) {
var backgroundTab = tabBar.createTab(currentWebView.profile, false);
- backgroundTab.acceptAsNewView(request);
- } else if (request.destination === WebEngineNewViewRequest.InNewDialog) {
+ backgroundTab.acceptAsNewWindow(request);
+ } else if (request.destination === WebEngineNewWindowRequest.InNewDialog) {
var dialog = applicationRoot.createDialog(currentWebView.profile);
- dialog.currentWebView.acceptAsNewView(request);
+ dialog.currentWebView.acceptAsNewWindow(request);
} else {
var window = applicationRoot.createWindow(currentWebView.profile);
- window.currentWebView.acceptAsNewView(request);
+ window.currentWebView.acceptAsNewWindow(request);
}
}
@@ -672,7 +672,7 @@ ApplicationWindow {
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
- onNewViewRequested: function(request) {
+ onNewWindowRequested: function(request) {
var tab = tabBar.createTab(currentWebView.profile);
request.openIn(tab);
}