on xenial help sign in
Cimi is scared total may be <= 0
b77f4d4Albert Astals
qml/Dash/Previews/PreviewProgress.qml+7−2
@@ -49,8 +49,13 @@ PreviewWidget {
49 dbusPath: progressBar.source["dbus-object"] || ""
49 dbusPath: progressBar.source["dbus-object"] || ""
50
50
51 onProgress: {
51 onProgress: {
52+ if (total <= 0) {
53+ progressBar.indeterminate = true;
54+ } else {
55+ progressBar.indeterminate = false;
52− var percentage = parseInt(received * 100 / total);
56+ var percentage = parseInt(received * 100 / total);
53− progressBar.value = percentage;
57+ progressBar.value = percentage;
58+ }
54 }
59 }
55
60
56 onFinished: {
61 onFinished: {