Fix the crash on exit bug in PopupApplet.

The Plasma::Dialog is initially created without a parent, but can later be
reparented to the Plasma::View. The problem with this is that when plasma
quits, the view and its children are deleted before the scene and its children.
So when the PopupApplet destructor is invoked, it tries to delete what is now
a dangling pointer.

Solve this problem by wrapping the dialog pointer in a QPointer.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=867830
This commit is contained in:
Fredrik Höglund 2008-10-04 15:36:09 +00:00
parent 78e744ca5d
commit 5da0fde1b3

View File

@ -39,7 +39,7 @@ public:
PopupApplet *q;
Plasma::Icon *icon;
Plasma::Dialog *dialog;
QPointer<Plasma::Dialog> dialog;
QGraphicsProxyWidget *proxy;
Plasma::PopupPlacement popupPlacement;
Plasma::AspectRatioMode savedAspectRatio;