From kde-commits Sat Aug 23 20:27:56 2008 From: =?utf-8?q?Aaron=20J=2E=20Seigo?= Date: Sat, 23 Aug 2008 20:27:56 +0000 To: kde-commits Subject: KDE/kdebase/workspace/plasma/shells/desktop Message-Id: <1219523276.496076.23967.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=121952328311398 SVN commit 851488 by aseigo: we don't want panels to keep their config around for later (though this makes sense for screens); so if a Horiz/Vert contaiment gets removed at runtime, then destroy the config for the panel in plasmarc as well M +12 -1 panelview.cpp M +1 -0 panelview.h --- trunk/KDE/kdebase/workspace/plasma/shells/desktop/panelview.cpp #851487:851488 @@ -73,7 +73,7 @@ if (panel) { connect(panel, SIGNAL(showAddWidgetsInterface(QPointF)), this, SLOT(showAppletBrowser())); - connect(panel, SIGNAL(destroyed(QObject*)), this, SLOT(deleteLater())); + connect(panel, SIGNAL(destroyed(QObject*)), this, SLOT(panelDeleted())); connect(panel, SIGNAL(toolBoxToggled()), this, SLOT(togglePanelController())); } @@ -832,5 +832,16 @@ } } +void PanelView::panelDeleted() +{ + if (!QApplication::closingDown()) { + // the panel was removed at runtime; clean up our configuration object as well + KConfigGroup c = config(); + c.deleteGroup(); + } + + deleteLater(); +} + #include "panelview.moc" --- trunk/KDE/kdebase/workspace/plasma/shells/desktop/panelview.h #851487:851488 @@ -134,6 +134,7 @@ void togglePanelController(); void edittingComplete(); void animateHide(qreal); + void panelDeleted(); /** * Updates the panel's position according to the screen and containment