mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-17 18:10:41 +02:00
Make Clara.io download more robust
This commit is contained in:
parent
95c175ae74
commit
5e82410371
2 changed files with 9 additions and 15 deletions
|
@ -23,6 +23,8 @@ ScrollingWindow {
|
|||
|
||||
property alias eventBridge: eventBridgeWrapper.eventBridge
|
||||
|
||||
signal loadingChanged(int status)
|
||||
|
||||
x: 100
|
||||
y: 100
|
||||
|
||||
|
@ -243,6 +245,7 @@ ScrollingWindow {
|
|||
if (loadRequest.status === WebEngineView.LoadSucceededStatus) {
|
||||
addressBar.text = loadRequest.url
|
||||
}
|
||||
root.loadingChanged(loadRequest.status);
|
||||
}
|
||||
|
||||
onIconChanged: {
|
||||
|
|
|
@ -40,15 +40,6 @@ Rectangle {
|
|||
height: parent.height - statusBarHeight
|
||||
focus: true
|
||||
|
||||
Timer {
|
||||
id: zipTimer
|
||||
running: false
|
||||
repeat: false
|
||||
interval: 1500
|
||||
property var handler;
|
||||
onTriggered: handler();
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: alertTimer
|
||||
running: false
|
||||
|
@ -113,13 +104,13 @@ Rectangle {
|
|||
request.openIn(newWindow.webView);
|
||||
if (File.isZippedFbx(desktop.currentUrl)) {
|
||||
runJavaScript(autoCancel);
|
||||
zipTimer.handler = function() {
|
||||
newWindow.destroy();
|
||||
}
|
||||
zipTimer.start();
|
||||
newWindow.loadingChanged.connect(function(status) {
|
||||
if (status > 0) {
|
||||
newWindow.destroy(); // Download has kicked off so we can destroy the Web window.
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
|
@ -164,4 +155,4 @@ Rectangle {
|
|||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue