diff options
author | Samuel Rødal <sroedal@trolltech.com> | 2009-10-29 13:28:36 (GMT) |
---|---|---|
committer | Samuel Rødal <sroedal@trolltech.com> | 2009-10-29 14:18:30 (GMT) |
commit | 4531ffbd8aa2cc0ae656715e449caca1649c18b9 (patch) | |
tree | 31432fbebde717f08469d77ee88b3de8f97914df /src/opengl/qgl.cpp | |
parent | 7881773800c05c09f0e85a80c1cbb678981bd6c0 (diff) | |
download | Qt-4531ffbd8aa2cc0ae656715e449caca1649c18b9.zip Qt-4531ffbd8aa2cc0ae656715e449caca1649c18b9.tar.gz Qt-4531ffbd8aa2cc0ae656715e449caca1649c18b9.tar.bz2 |
Added QImagePixmapCleanupHooks functions for enabling hooks.
Better than having to befriend QPixmapData and setting is_cached
manually.
Reviewed-by: Tom Cooksey
Diffstat (limited to 'src/opengl/qgl.cpp')
-rw-r--r-- | src/opengl/qgl.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index e80521b..3fec1f0 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -2137,7 +2137,7 @@ QGLTexture *QGLContextPrivate::bindTexture(const QImage &image, GLenum target, G Q_ASSERT(texture); if (texture->id > 0) - const_cast<QImage &>(image).data_ptr()->is_cached = true; + QImagePixmapCleanupHooks::enableCleanupHooks(image); return texture; } @@ -2396,7 +2396,7 @@ QGLTexture *QGLContextPrivate::bindTexture(const QPixmap &pixmap, GLenum target, Q_ASSERT(texture); if (texture->id > 0) - const_cast<QPixmap &>(pixmap).data_ptr()->is_cached = true; + QImagePixmapCleanupHooks::enableCleanupHooks(pixmap); return texture; } |