Line 0
Link Here
|
|
|
1 |
--- applets/systemloadviewer/package/contents/ui/SystemLoadViewer.qml.orig 2020-03-31 14:08:40 UTC |
2 |
+++ applets/systemloadviewer/package/contents/ui/SystemLoadViewer.qml |
3 |
@@ -179,12 +179,15 @@ Item { |
4 |
onNewData: { |
5 |
if (sourceName == sysLoad) { |
6 |
totalCpuLoadProportions[0] = fitCpuLoad(data.value) |
7 |
+ totalCpuLoadProportionsChanged() |
8 |
} |
9 |
else if (sourceName == userLoad) { |
10 |
totalCpuLoadProportions[1] = fitCpuLoad(data.value) |
11 |
+ totalCpuLoadProportionsChanged() |
12 |
} |
13 |
else if (sourceName == niceLoad) { |
14 |
totalCpuLoadProportions[2] = fitCpuLoad(data.value) |
15 |
+ totalCpuLoadProportionsChanged() |
16 |
} |
17 |
else if (sourceName == ioWait) { |
18 |
totalCpuLoadProportions[3] = fitCpuLoad(data.value) |
19 |
@@ -192,6 +195,7 @@ Item { |
20 |
} |
21 |
else if (sourceName == memApplication) { |
22 |
memoryUsageProportions[0] = fitMemoryUsage(data.value) |
23 |
+ memoryUsageProportionsChanged() |
24 |
} |
25 |
else if (sourceName == memBuffers) { |
26 |
memoryUsageProportions[1] = fitMemoryUsage(data.value) |
27 |
@@ -250,8 +254,8 @@ Item { |
28 |
var swapTotal = swapFree + swapUsed |
29 |
var swapPart = i18n("Swap: %1/%2 MiB", Math.round(swapUsed), Math.round(swapTotal)) |
30 |
|
31 |
- var cacheDirty = parseFloat(dataSource.data[dataSource.cacheDirty].value) / 1024 |
32 |
- var cacheWriteback = parseFloat(dataSource.data[dataSource.cacheWriteback].value) / 1024 |
33 |
+ var cacheDirty = parseFloat(dataSource.data[dataSource.cacheDirty] ? dataSource.data[dataSource.cacheDirty].value : 0) / 1024 |
34 |
+ var cacheWriteback = parseFloat(dataSource.data[dataSource.cacheWriteback] ? dataSource.data[dataSource.cacheWriteback].value : 0) / 1024 |
35 |
var cachePart = i18n("Cache Dirty, Writeback: %1 MiB, %2 MiB", Math.round(cacheDirty), Math.round(cacheWriteback)) |
36 |
|
37 |
if (cpuClockPart === "") { |