summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2012-04-16 16:39:44 +0200
committerQt by Nokia <qt-info@nokia.com>2012-04-16 18:15:00 +0200
commit6615dc1370300188f2979fb2c6b8eaa6049d5824 (patch)
tree7fdeb0ad8a789aaf03243129a7fdb84ea7612ad0 /src
parent5eaf0b8ef0e0ad74e4c21cb6e688071a6cf8f66f (diff)
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 <girish.1.ramakrishnan@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qguiapplication.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 8dcd58a51a..0eb53df443 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -68,6 +68,7 @@
#include <QtGui/QGenericPluginFactory>
#include <QtGui/qstylehints.h>
#include <QtGui/qinputpanel.h>
+#include <QtGui/qpixmapcache.h>
#include <QtGui/qplatformtheme_qpa.h>
#include <QtGui/qplatforminputcontext_qpa.h>
#include <private/qplatforminputcontext_qpa_p.h>
@@ -892,6 +893,8 @@ QGuiApplicationPrivate::~QGuiApplicationPrivate()
qt_cleanupFontDatabase();
+ QPixmapCache::clear();
+
delete platform_theme;
delete platform_integration;
platform_integration = 0;