diff options
author | Samuel Rødal <sroedal@trolltech.com> | 2010-02-04 09:08:43 (GMT) |
---|---|---|
committer | Samuel Rødal <sroedal@trolltech.com> | 2010-02-04 09:08:43 (GMT) |
commit | 47b7af3bfd78c6d4efd3ce93be275a60430679d2 (patch) | |
tree | e7d7ff32ae72008b74df37e13caf568b33ac19b5 /src/gui/image/qpixmap_x11.cpp | |
parent | 8e98033a67263f6a2d9155f228dc28e2faee4f5e (diff) | |
parent | 39523f9f78a7c93643924711b1ed8006ebfcf5ce (diff) | |
download | Qt-47b7af3bfd78c6d4efd3ce93be275a60430679d2.zip Qt-47b7af3bfd78c6d4efd3ce93be275a60430679d2.tar.gz Qt-47b7af3bfd78c6d4efd3ce93be275a60430679d2.tar.bz2 |
Merge remote branch 'staging/4.6' into 4.6
Manual resolve of conflict in changes-4.6.2 in staging-2.
Conflicts:
dist/changes-4.6.2
Diffstat (limited to 'src/gui/image/qpixmap_x11.cpp')
-rw-r--r-- | src/gui/image/qpixmap_x11.cpp | 14 |
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 |