From: Holger Hans Peter Freyther Date: Mon, 16 Apr 2012 14:39:44 +0000 (+0200) Subject: gui: Clear the QPixmapCache before destroying the QPlatformIntegration X-Git-Tag: 071012110112~1660 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6615dc1370300188f2979fb2c6b8eaa6049d5824;p=profile%2Fivi%2Fqtbase.git gui: Clear the QPixmapCache before destroying the QPlatformIntegration The QPixmap in the pixmap cache should not outlive the QPlatformIntegration. Clear the cache shortly before destroying the platform integration. This is fixing a crash with the DirectFB plugin in the tst_qpixmapcache test. Change-Id: I0b1a304dc37d874b412aadb77f8dbaa7d292711f Reviewed-by: Girish Ramakrishnan Reviewed-by: Samuel Rødal --- diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 8dcd58a..0eb53df 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -68,6 +68,7 @@ #include #include #include +#include #include #include #include @@ -892,6 +893,8 @@ QGuiApplicationPrivate::~QGuiApplicationPrivate() qt_cleanupFontDatabase(); + QPixmapCache::clear(); + delete platform_theme; delete platform_integration; platform_integration = 0;