watch for containment destruction; for people who like torturing plasma in weird nd wonderful ways
BUG:166824 svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=833976
This commit is contained in:
parent
9fce6a940f
commit
98e46ae18a
@ -60,6 +60,7 @@ public:
|
||||
void initFilters();
|
||||
void init();
|
||||
void initRunningApplets();
|
||||
void containmentDestroyed();
|
||||
|
||||
/**
|
||||
* Tracks a new running applet
|
||||
@ -222,7 +223,16 @@ QString AppletBrowserWidget::application()
|
||||
void AppletBrowserWidget::setContainment(Plasma::Containment *containment)
|
||||
{
|
||||
if (d->containment != containment) {
|
||||
if (d->containment) {
|
||||
d->containment->disconnect(this);
|
||||
}
|
||||
|
||||
d->containment = containment;
|
||||
|
||||
if (d->containment) {
|
||||
connect(d->containment, SIGNAL(destroyed(QObject*)), this, SLOT(containmentDestroyed()));
|
||||
}
|
||||
|
||||
d->initRunningApplets();
|
||||
}
|
||||
}
|
||||
@ -232,6 +242,11 @@ Containment *AppletBrowserWidget::containment() const
|
||||
return d->containment;
|
||||
}
|
||||
|
||||
void AppletBrowserWidgetPrivate::containmentDestroyed()
|
||||
{
|
||||
containment = 0;
|
||||
}
|
||||
|
||||
void AppletBrowserWidget::addApplet()
|
||||
{
|
||||
if (!d->containment) {
|
||||
|
Loading…
Reference in New Issue
Block a user