summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qpixmap_x11.cpp
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2010-02-11 06:09:18 (GMT)
committerAaron McCarthy <aaron.mccarthy@nokia.com>2010-02-11 06:09:18 (GMT)
commit9a76a90b1944db52bd4180d27c01781fbb3499d4 (patch)
tree46ac1557761e30127330520d2fa6412305e07443 /src/gui/image/qpixmap_x11.cpp
parentb5fe99c0105a9791e34a8b959822430497a4aeb9 (diff)
parentb9907e309885b4b8ce280c721231a56a583b51d0 (diff)
downloadQt-9a76a90b1944db52bd4180d27c01781fbb3499d4.zip
Qt-9a76a90b1944db52bd4180d27c01781fbb3499d4.tar.gz
Qt-9a76a90b1944db52bd4180d27c01781fbb3499d4.tar.bz2
Merge remote branch 'origin/4.6' into bearermanagement/integration
Conflicts: src/s60installs/s60installs.pro
Diffstat (limited to 'src/gui/image/qpixmap_x11.cpp')
-rw-r--r--src/gui/image/qpixmap_x11.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/gui/image/qpixmap_x11.cpp b/src/gui/image/qpixmap_x11.cpp
index 0e66e09..e1e8a0d 100644
--- a/src/gui/image/qpixmap_x11.cpp
+++ b/src/gui/image/qpixmap_x11.cpp
@@ -68,6 +68,7 @@
#include "qx11info_x11.h"
#include <private/qdrawhelper_p.h>
#include <private/qimage_p.h>
+#include <private/qimagepixmapcleanuphooks_p.h>
#include <stdlib.h>
@@ -1228,6 +1229,12 @@ void QX11PixmapData::fill(const QColor &fillColor)
QX11PixmapData::~QX11PixmapData()
{
+ // Cleanup hooks have to be called before the handles are freed
+ if (is_cached) {
+ QImagePixmapCleanupHooks::executePixmapDataDestructionHooks(this);
+ is_cached = false;
+ }
+
release();
}
@@ -1236,8 +1243,13 @@ void QX11PixmapData::release()
delete pengine;
pengine = 0;
- if (!X11)
+ if (!X11) {
+#ifndef QT_NO_DEBUG
+ qWarning("~QX11PixmapData(): QPixmap objects must be destroyed before the QApplication"
+ " object, otherwise the native pixmap object will be leaked.");
+#endif
return;
+ }
if (x11_mask) {
#ifndef QT_NO_XRENDER