summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qtextureglyphcache.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/painting/qtextureglyphcache.cpp')
-rw-r--r--src/gui/painting/qtextureglyphcache.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/painting/qtextureglyphcache.cpp b/src/gui/painting/qtextureglyphcache.cpp
index 97f82d16d3..20039d902a 100644
--- a/src/gui/painting/qtextureglyphcache.cpp
+++ b/src/gui/painting/qtextureglyphcache.cpp
@@ -339,7 +339,7 @@ void QImageTextureGlyphCache::fillTexture(const Coord &c, glyph_t g, QFixed subP
uchar *dest = d + (c.y + y) *dbpl + c.x/8;
if (y < mh) {
- uchar *src = mask.scanLine(y);
+ const uchar *src = mask.constScanLine(y);
for (int x = 0; x < c.w/8; ++x) {
if (x < (mw+7)/8)
dest[x] = src[x];
@@ -361,7 +361,7 @@ void QImageTextureGlyphCache::fillTexture(const Coord &c, glyph_t g, QFixed subP
for (int y = 0; y < c.h; ++y) {
uchar *dest = d + (c.y + y) *dbpl + c.x;
if (y < mh) {
- uchar *src = (uchar *) mask.scanLine(y);
+ const uchar *src = mask.constScanLine(y);
for (int x = 0; x < c.w; ++x) {
if (x < mw)
dest[x] = (src[x >> 3] & (1 << (7 - (x & 7)))) > 0 ? 255 : 0;
@@ -372,7 +372,7 @@ void QImageTextureGlyphCache::fillTexture(const Coord &c, glyph_t g, QFixed subP
for (int y = 0; y < c.h; ++y) {
uchar *dest = d + (c.y + y) *dbpl + c.x;
if (y < mh) {
- uchar *src = (uchar *) mask.scanLine(y);
+ const uchar *src = mask.constScanLine(y);
for (int x = 0; x < c.w; ++x) {
if (x < mw)
dest[x] = src[x];