summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/quicktestbrowser/BrowserWindow.qml3
-rw-r--r--tests/quicktestbrowser/DownloadView.qml5
2 files changed, 5 insertions, 3 deletions
diff --git a/tests/quicktestbrowser/BrowserWindow.qml b/tests/quicktestbrowser/BrowserWindow.qml
index 8d61ac590..d438075d8 100644
--- a/tests/quicktestbrowser/BrowserWindow.qml
+++ b/tests/quicktestbrowser/BrowserWindow.qml
@@ -77,9 +77,10 @@ ApplicationWindow {
id: testProfile
storageName: "Test"
httpCacheType: httpDiskCacheEnabled.checked ? WebEngineProfile.DiskHttpCache : WebEngineProfile.MemoryHttpCache;
- onDownloadStarted: {
+ onDownloadRequested: {
downloadView.visible = true
downloadView.append(download)
+ download.accept()
}
}
diff --git a/tests/quicktestbrowser/DownloadView.qml b/tests/quicktestbrowser/DownloadView.qml
index 4475e183f..3367dfc71 100644
--- a/tests/quicktestbrowser/DownloadView.qml
+++ b/tests/quicktestbrowser/DownloadView.qml
@@ -72,11 +72,12 @@ Rectangle {
Rectangle {
id: progressBar
- property int progress: downloadModel.downloads[index] ? downloadModel.downloads[index].progress : 0
+ property real progress: downloadModel.downloads[index]
+ ? downloadModel.downloads[index].receivedBytes / downloadModel.downloads[index].totalBytes : 0
radius: 3
color: width == listView.width ? "green" : "#2b74c7"
- width: listView.width / 100 * progress
+ width: listView.width * progress
height: cancelButton.height
Behavior on width {