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
|
||||
|
||||
property bool active: true
|
||||
property bool locked: false
|
||||
|
||||
property bool _coreActive: false
|
||||
onActiveChanged: {
|
||||
|
|
@ -21,6 +22,8 @@ Column {
|
|||
_coreActive = false;
|
||||
S.SystemStats.coreConsumers--;
|
||||
}
|
||||
if (active)
|
||||
_cpuHistory = [];
|
||||
}
|
||||
Component.onDestruction: if (_coreActive)
|
||||
S.SystemStats.coreConsumers--
|
||||
|
|
@ -171,8 +174,6 @@ Column {
|
|||
}
|
||||
|
||||
property var _cpuHistory: []
|
||||
onActiveChanged: if (active)
|
||||
_cpuHistory = []
|
||||
Connections {
|
||||
target: S.SystemStats
|
||||
function onCpuUsageChanged() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue