mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01:00
QML troubleshooting
Trying to find out why it does multiple downloads on one click, when everything fails. Has something to do with a download finish request getting sent despite not being completed.
This commit is contained in:
parent
6152fa28b7
commit
ab02d16eb7
1 changed files with 15 additions and 10 deletions
|
@ -221,20 +221,25 @@ ScrollingWindow {
|
|||
|
||||
Component.onCompleted: {
|
||||
webview.profile.downloadRequested.connect(function(download){
|
||||
console.log("Download start: " + download.state)
|
||||
download.accept()
|
||||
console.log("Download accept: " + download.state)
|
||||
if (download.state === WebEngineDownloadItem.DownloadInterrupted) {
|
||||
console.log("Download? " + download.state)
|
||||
console.log("download failed to complete")
|
||||
if (download.state === WebEngineDownloadItem.DownloadRequested) {
|
||||
console.log("Download start: " + download.state)
|
||||
download.accept()
|
||||
console.log("Download accept: " + download.state)
|
||||
if (download.state === WebEngineDownloadItem.DownloadInterrupted) {
|
||||
console.log("Download? " + download.state)
|
||||
console.log("download failed to complete")
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
webview.profile.downloadFinished.connect(function(download){
|
||||
console.log("Download Finished: " + download.state)
|
||||
if (download.state === WebEngineDownloadItem.DownloadCompleted) {console.log("getting download completed state")}
|
||||
console.log("download success")
|
||||
File.runUnzip(download.path)
|
||||
if (download.state === WebEngineDownloadItem.DownloadCompleted) {
|
||||
console.log("Download Finished: " + download.state)
|
||||
console.log("File object is: " + File)
|
||||
File.runUnzip(download.path)
|
||||
} else {
|
||||
console.log("The download was corrupted")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue