mirror of
https://github.com/overte-org/overte.git
synced 2025-04-14 14:47:19 +02:00
back to master version
This commit is contained in:
parent
c5b998a2a8
commit
232ac74b26
2 changed files with 7 additions and 11 deletions
|
@ -28,7 +28,7 @@ Rectangle {
|
|||
color: hifi.colors.baseGrayShadow
|
||||
property var currentUrl: "https://metaverse.highfidelity.com/marketplace"
|
||||
|
||||
Controls.WebView {
|
||||
Controls.BaseWebView {
|
||||
id: webview
|
||||
url: currentUrl
|
||||
anchors.top: switchMarketView.bottom
|
||||
|
@ -48,12 +48,15 @@ Rectangle {
|
|||
property var autoCancel: 'var element = $("a.btn.cancel");
|
||||
element.click();'
|
||||
|
||||
newWindowHook: function (component, newWindow) {
|
||||
onNewViewRequested: {
|
||||
var component = Qt.createComponent("Browser.qml");
|
||||
var newWindow = component.createObject(desktop);
|
||||
request.openIn(newWindow.webView);
|
||||
if (File.isZippedFbx(desktop.currentUrl)) {
|
||||
runJavaScript(autoCancel);
|
||||
zipTimer.handler = function() {
|
||||
newWindow.destroy();
|
||||
};
|
||||
runJavaScript(autoCancel);
|
||||
}
|
||||
zipTimer.start();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -61,13 +61,6 @@ WebEngineView {
|
|||
}
|
||||
}
|
||||
|
||||
property var newWindowHook: function (component, newWindow, request) { }; // override if you need to
|
||||
onNewViewRequested:{
|
||||
var component = Qt.createComponent("../Browser.qml");
|
||||
var newWindow = component.createObject(desktop);
|
||||
request.openIn(newWindow.webView)
|
||||
newWindowHook(component, newWindow, request);
|
||||
}
|
||||
|
||||
// This breaks the webchannel used for passing messages. Fixed in Qt 5.6
|
||||
// See https://bugreports.qt.io/browse/QTBUG-49521
|
||||
|
|
Loading…
Reference in a new issue