mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-04-25 07:57:19 +00:00
fix memory leak
This commit is contained in:
parent
681fec4cac
commit
35a5aa6a6c
@ -174,7 +174,7 @@ void DPAdds::changePanelsState()
|
|||||||
if (debug) qDebug() << PDEBUG;
|
if (debug) qDebug() << PDEBUG;
|
||||||
if (panelsToControl == QString("-1")) return;
|
if (panelsToControl == QString("-1")) return;
|
||||||
|
|
||||||
// QList<Plasma::Containment *> panels = getPanels();
|
QList<Plasma::Containment *> panels = getPanels();
|
||||||
// for (int i=0; i<panels.count(); i++) {
|
// for (int i=0; i<panels.count(); i++) {
|
||||||
// if (!panelsToControl.split(QChar(',')).contains(QString::number(i))) continue;
|
// if (!panelsToControl.split(QChar(',')).contains(QString::number(i))) continue;
|
||||||
// bool wasVisible = panels[i]->view()->isVisible();
|
// bool wasVisible = panels[i]->view()->isVisible();
|
||||||
@ -192,6 +192,7 @@ void DPAdds::changePanelsState()
|
|||||||
// KWindowSystem::setOnAllDesktops(winId, true);
|
// KWindowSystem::setOnAllDesktops(winId, true);
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
panels.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -230,6 +231,7 @@ QList<Plasma::Containment *> DPAdds::getPanels()
|
|||||||
if (containment->corona()->containments()[i]->containmentType() ==
|
if (containment->corona()->containments()[i]->containmentType() ==
|
||||||
Plasma::Types::ContainmentType::PanelContainment)
|
Plasma::Types::ContainmentType::PanelContainment)
|
||||||
panels.append(containment->corona()->containments()[i]);
|
panels.append(containment->corona()->containments()[i]);
|
||||||
|
delete containment;
|
||||||
|
|
||||||
return panels;
|
return panels;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user