summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2015-03-05 22:25:45 -0800
committerThiago Macieira <thiago.macieira@intel.com>2015-03-26 06:11:11 +0000
commitf43a624ab840c387c6e26dc6e9259200d0b1a3b7 (patch)
treec9590f1db6e25d659486f17bb1ce2518bd4b39c0 /src/opengl/qgl.cpp
parentb798b53db718d0eb0dad31a3b9bfe81d4ec76af6 (diff)
QtOpenGL: Fix const correctness in old style casts
Found with GCC's -Wcast-qual. Change-Id: Ia0aac2f09e9245339951ffff13c946886247a98a Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Diffstat (limited to 'src/opengl/qgl.cpp')
-rw-r--r--src/opengl/qgl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index fc1280bfc4..ca133f8830 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -2312,7 +2312,7 @@ static void convertToGLFormatHelper(QImage &dst, const QImage &img, GLenum textu
qreal sy = target_height / qreal(img.height());
quint32 *dest = (quint32 *) dst.scanLine(0); // NB! avoid detach here
- uchar *srcPixels = (uchar *) img.scanLine(img.height() - 1);
+ const uchar *srcPixels = img.constScanLine(img.height() - 1);
int sbpl = img.bytesPerLine();
int dbpl = dst.bytesPerLine();