summaryrefslogtreecommitdiff
path: root/src/gui/image/qpixmap_raster.cpp
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-12-13 11:39:16 +0100
committerOlivier Goffart <olivier.goffart@nokia.com>2010-12-13 11:39:16 +0100
commitd369ae7b831744c796571aa86b5d6570b09e70e4 (patch)
tree0ad8abef937ac3009f32b600a8e3b5644d7c637c /src/gui/image/qpixmap_raster.cpp
parentc8a2533cb39ce0c7479880cd889ad594d569ecc0 (diff)
parent044708cb7f7fd1f2d7b18d20269422e7f3a1cb83 (diff)
downloadqt4-tools-d369ae7b831744c796571aa86b5d6570b09e70e4.tar.gz
Merge remote branch 'origin/4.7' into qt-master-from-4.7
Conflicts: configure src/gui/graphicsview/qgraphicslayout.cpp src/gui/text/qfontengine_s60.cpp src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/qwindowsurface_gl.cpp src/s60installs/bwins/QtGuiu.def src/s60installs/eabi/QtGuiu.def tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
Diffstat (limited to 'src/gui/image/qpixmap_raster.cpp')
-rw-r--r--src/gui/image/qpixmap_raster.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gui/image/qpixmap_raster.cpp b/src/gui/image/qpixmap_raster.cpp
index 65c034478e..d34c9c82eb 100644
--- a/src/gui/image/qpixmap_raster.cpp
+++ b/src/gui/image/qpixmap_raster.cpp
@@ -44,11 +44,13 @@
#include "qpixmap_raster_p.h"
#include "qnativeimage_p.h"
#include "qimage_p.h"
+#include "qpaintengine.h"
#include "qbitmap.h"
#include "qimage.h"
#include <QBuffer>
#include <QImageReader>
+#include <private/qimage_p.h>
#include <private/qsimd_p.h>
#include <private/qwidget_p.h>
#include <private/qdrawhelper_p.h>
@@ -308,6 +310,15 @@ bool QRasterPixmapData::hasAlphaChannel() const
QImage QRasterPixmapData::toImage() const
{
+ if (!image.isNull()) {
+ QImageData *data = const_cast<QImage &>(image).data_ptr();
+ if (data->paintEngine && data->paintEngine->isActive()
+ && data->paintEngine->paintDevice() == &image)
+ {
+ return image.copy();
+ }
+ }
+
return image;
}