fix duplicate onActiveChanged in cpu applet
This commit is contained in:
parent
d85b65c6d9
commit
e7bf175169
1 changed files with 3 additions and 2 deletions
|
|
@ -11,6 +11,7 @@ Column {
|
||||||
required property color accentColor
|
required property color accentColor
|
||||||
|
|
||||||
property bool active: true
|
property bool active: true
|
||||||
|
property bool locked: false
|
||||||
|
|
||||||
property bool _coreActive: false
|
property bool _coreActive: false
|
||||||
onActiveChanged: {
|
onActiveChanged: {
|
||||||
|
|
@ -21,6 +22,8 @@ Column {
|
||||||
_coreActive = false;
|
_coreActive = false;
|
||||||
S.SystemStats.coreConsumers--;
|
S.SystemStats.coreConsumers--;
|
||||||
}
|
}
|
||||||
|
if (active)
|
||||||
|
_cpuHistory = [];
|
||||||
}
|
}
|
||||||
Component.onDestruction: if (_coreActive)
|
Component.onDestruction: if (_coreActive)
|
||||||
S.SystemStats.coreConsumers--
|
S.SystemStats.coreConsumers--
|
||||||
|
|
@ -171,8 +174,6 @@ Column {
|
||||||
}
|
}
|
||||||
|
|
||||||
property var _cpuHistory: []
|
property var _cpuHistory: []
|
||||||
onActiveChanged: if (active)
|
|
||||||
_cpuHistory = []
|
|
||||||
Connections {
|
Connections {
|
||||||
target: S.SystemStats
|
target: S.SystemStats
|
||||||
function onCpuUsageChanged() {
|
function onCpuUsageChanged() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue