Commit e725782c authored by Hoang Vu's avatar Hoang Vu
Browse files

Fix bug: plasmashell high cpu usage

    + When an task in an group change its title frequently,
      plasmashell cpu usage increase to 100% (one core)
parent 66b159ff
...@@ -146,7 +146,10 @@ PlasmaCore.Dialog { ...@@ -146,7 +146,10 @@ PlasmaCore.Dialog {
return -1; return -1;
} }
onItemAdded: Qt.callLater(updateSize) onItemAdded: {
item.labelTextChanged.connect(updateSize);
Qt.callLater(updateSize)
}
onItemRemoved: { onItemRemoved: {
if (groupDialog.visible && index > 0 && index == count) { if (groupDialog.visible && index > 0 && index == count) {
...@@ -278,8 +281,6 @@ PlasmaCore.Dialog { ...@@ -278,8 +281,6 @@ PlasmaCore.Dialog {
if (textWidth > maxWidth) { if (textWidth > maxWidth) {
maxWidth = textWidth; maxWidth = textWidth;
} }
task.labelTextChanged.connect(updateSize);
} }
maxHeight = groupRepeater.count * (LayoutManager.verticalMargins() + Math.max(theme.mSize(theme.defaultFont).height, PlasmaCore.Units.iconSizes.medium)); maxHeight = groupRepeater.count * (LayoutManager.verticalMargins() + Math.max(theme.mSize(theme.defaultFont).height, PlasmaCore.Units.iconSizes.medium));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment