summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-02-09 17:33:24 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-02-09 17:33:24 (GMT)
commit3817f59657147c6341dea54d220e5bfa704f24de (patch)
treedab324363ae616d634df847c040ef00e6c746a28 /src
parentf4d385cec1f09971163d7e5d9e9b09b19f1873c4 (diff)
parenta1f695f7b3b671c26925d41fba7dff1d3cb49da2 (diff)
downloadQt-3817f59657147c6341dea54d220e5bfa704f24de.zip
Qt-3817f59657147c6341dea54d220e5bfa704f24de.tar.gz
Qt-3817f59657147c6341dea54d220e5bfa704f24de.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Fixed tst_qpixmap::toImageDeepCopy autotest for GL graphicssystem.
Diffstat (limited to 'src')
-rw-r--r--src/opengl/qpixmapdata_gl.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/opengl/qpixmapdata_gl.cpp b/src/opengl/qpixmapdata_gl.cpp
index 9980f2d..43e80c1 100644
--- a/src/opengl/qpixmapdata_gl.cpp
+++ b/src/opengl/qpixmapdata_gl.cpp
@@ -586,6 +586,12 @@ QImage QGLPixmapData::toImage() const
if (m_renderFbo) {
copyBackFromRenderFbo(true);
} else if (!m_source.isNull()) {
+ QImageData *data = const_cast<QImage &>(m_source).data_ptr();
+ if (data->paintEngine && data->paintEngine->isActive()
+ && data->paintEngine->paintDevice() == &m_source)
+ {
+ return m_source.copy();
+ }
return m_source;
} else if (m_dirty || m_hasFillColor) {
return fillImage(m_fillColor);