From e25913cafba9545619ab737e6834dbf27cd2285c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Thu, 28 Apr 2011 19:15:12 +0200 Subject: [PATCH] Ensure Add/remove button is removed when DesktopGrid is unloaded BUG: 271481 FIXED-IN: 4.7.0 --- effects/desktopgrid/desktopgrid.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/effects/desktopgrid/desktopgrid.cpp b/effects/desktopgrid/desktopgrid.cpp index 79240f7ac6..55ec053b5a 100644 --- a/effects/desktopgrid/desktopgrid.cpp +++ b/effects/desktopgrid/desktopgrid.cpp @@ -89,6 +89,12 @@ DesktopGridEffect::~DesktopGridEffect() foreach (ElectricBorder border, borderActivate) { effects->unreserveElectricBorder(border); } + QHash< DesktopButtonsView*, EffectWindow* >::iterator i = m_desktopButtonsViews.begin(); + while (i != m_desktopButtonsViews.end()) { + DesktopButtonsView *view = i.key(); + i = m_desktopButtonsViews.erase(i); + view->deleteLater(); + } } void DesktopGridEffect::reconfigure(ReconfigureFlags)