summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qpixmap_x11.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-02-03 18:13:44 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-02-03 18:13:44 (GMT)
commit1b8c6049af9f20ac3df5469dd18d231da6aebfcd (patch)
tree4cb8deebbc737c100e3e8131e7a36bc4bc0d84b9 /src/gui/image/qpixmap_x11.cpp
parenta9fa8187b1a7efe343e0bf2722cde5c0ef5fa77e (diff)
parent71e2f9d35a922fb0ec8fff40bdc7d2d47d42dd8c (diff)
downloadQt-1b8c6049af9f20ac3df5469dd18d231da6aebfcd.zip
Qt-1b8c6049af9f20ac3df5469dd18d231da6aebfcd.tar.gz
Qt-1b8c6049af9f20ac3df5469dd18d231da6aebfcd.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2: (29 commits) Compiler warning in QAbstractSlider. Optimize QPathClipper::pathToRect. QGraphicsScene: Use QPainter::setClipRect instead of setClipPath if possible. QStyleSheetStyle: Fix combinaison of border-image and border-radius Revert "QAbstractScrollArea: Wheel over a scrollarea that has only one horizontal scrollbar" Proper Fav icon is not shown, for all the links default fav icon shown Update changes-4.6.2. Make DSFLIP_ONSYNC part of the default flip flags. Fixed a failure in tst_qgl. 4.6.2 changes Avoids a possible crash when saving the state of a main window Implemented QGifHandler::imageCount(). Fixed compilation of the GL2 engine for OpenGL ES 2. fix whitespace Document that QModelIndex::child does not work for the root item Fixed missing textures in the boxes demo. Fix QTBUG_7714_fullUpdateDiscardingOpacityUpdate2 autotest in qws-linux Assert failure when setting a widget focus proxy as its successor in tab order Fixed garbled 3D Qt logo in the overpainting example. fix crash in Phonon::DS9 backend ...
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