summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorJüri Valdmann <juri.valdmann@qt.io>2018-07-09 09:27:33 +0200
committerJüri Valdmann <juri.valdmann@qt.io>2018-07-16 08:53:10 +0000
commitf055da31fb011e852345665fceb6933fa966f731 (patch)
tree8f8fbfd4e7c963bebfa7aee577d649009c9d8645 /examples
parent5ad6d45d88e020da039872d3187416547b11e605 (diff)
Fix segfault in devtools openInNewTab handling
- Use OpenURL on the devtools WebContents. - Guard against self-destruction (otherwise quicknanobrowser crashes). - Change quicknanobrowser to open links in new tabs. Task-number: QTBUG-69359 Change-Id: I4db379731c6fa855124d38c5066b0aad622861d2 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'examples')
-rw-r--r--examples/webengine/quicknanobrowser/BrowserWindow.qml5
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/webengine/quicknanobrowser/BrowserWindow.qml b/examples/webengine/quicknanobrowser/BrowserWindow.qml
index fc9cd025..3bfcaabf 100644
--- a/examples/webengine/quicknanobrowser/BrowserWindow.qml
+++ b/examples/webengine/quicknanobrowser/BrowserWindow.qml
@@ -505,6 +505,11 @@ ApplicationWindow {
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
+ onNewViewRequested: function(request) {
+ var tab = tabs.createEmptyTab(currentWebView.profile);
+ tabs.currentIndex = tabs.count - 1;
+ request.openIn(tab.item);
+ }
}
MessageDialog {
id: sslDialog