don't try to update the labels when the extender is in its destructor
crash-- svn path=/trunk/KDE/kdelibs/; revision=1131699
This commit is contained in:
parent
f99d57fdc1
commit
4d23421690
@ -109,6 +109,7 @@ Extender::Extender(Applet *applet)
|
|||||||
|
|
||||||
Extender::~Extender()
|
Extender::~Extender()
|
||||||
{
|
{
|
||||||
|
d->destroying = true;
|
||||||
foreach (ExtenderItem *item, d->attachedExtenderItems) {
|
foreach (ExtenderItem *item, d->attachedExtenderItems) {
|
||||||
disconnect(item, 0, this, 0);
|
disconnect(item, 0, this, 0);
|
||||||
delete item;
|
delete item;
|
||||||
@ -465,6 +466,10 @@ void Extender::itemAddedEvent(ExtenderItem *item, const QPointF &pos)
|
|||||||
|
|
||||||
void Extender::itemRemovedEvent(ExtenderItem *item)
|
void Extender::itemRemovedEvent(ExtenderItem *item)
|
||||||
{
|
{
|
||||||
|
if (d->destroying) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
d->layout->removeItem(item);
|
d->layout->removeItem(item);
|
||||||
|
|
||||||
if (d->spacerWidget) {
|
if (d->spacerWidget) {
|
||||||
@ -563,7 +568,8 @@ ExtenderPrivate::ExtenderPrivate(Applet *applet, Extender *extender) :
|
|||||||
spacerWidget(0),
|
spacerWidget(0),
|
||||||
emptyExtenderMessage(QString()),
|
emptyExtenderMessage(QString()),
|
||||||
emptyExtenderLabel(0),
|
emptyExtenderLabel(0),
|
||||||
appearance(Extender::NoBorders)
|
appearance(Extender::NoBorders),
|
||||||
|
destroying(false)
|
||||||
{
|
{
|
||||||
background->setImagePath("widgets/extender-background");
|
background->setImagePath("widgets/extender-background");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user