From 6c078d9b6cde43119495eb4aceac397da303d04c Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Wed, 25 Mar 2009 20:40:44 +0100 Subject: alphaMask needs to be const, because first bytesPerLine() is called and then bits(). The non-const bits() may detach and realign the data, so that the previous result of bytesPerLine() ist invalid. On S60, we actually had a 'skew' effect because of that. --- src/gui/text/qfontengine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp index c4dffdf..47fe5c2 100644 --- a/src/gui/text/qfontengine.cpp +++ b/src/gui/text/qfontengine.cpp @@ -542,7 +542,7 @@ void QFontEngine::addBitmapFontToPath(qreal x, qreal y, const QGlyphLayout &glyp advanceY += glyphs.advances_y[i]; continue; } - QImage alphaMask = alphaMapForGlyph(glyphs.glyphs[i]); + const QImage alphaMask = alphaMapForGlyph(glyphs.glyphs[i]); const int w = alphaMask.width(); const int h = alphaMask.height(); -- cgit v0.12