From 7f0e9fb3b2ba92afeb394efa2bd532ecd0ef685c Mon Sep 17 00:00:00 2001 From: Ben Cooksley Date: Tue, 22 Nov 2011 21:14:54 +1300 Subject: [PATCH] Don't crash on exit. BUG:284989 REVIEW:103202 --- private/containment_p.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/private/containment_p.h b/private/containment_p.h index 4025bf4d3..75a6f807e 100644 --- a/private/containment_p.h +++ b/private/containment_p.h @@ -67,10 +67,14 @@ public: ~ContainmentPrivate() { - qDeleteAll(applets); + // qDeleteAll is broken with Qt4.8, delete it by hand + while (!applets.isEmpty()) { + delete applets.first(); + } applets.clear(); qDeleteAll(dropMenus); + dropMenus.clear(); } void createToolBox();