Fix build due to source incompatible change with FreeType 2.5.4

http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=b3500af717010137046ec4076d1e1c0641e33727

../gui/text/qfontengine_ft.cpp: In member function ‘QFontEngineFT::Glyph* QFontEngineFT::loadGlyph(QFontEngineFT::QGlyphSet*, uint, QFixed, QFontEngine::GlyphFormat, bool) const’:
../gui/text/qfontengine_ft.cpp:1126:39: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
                        for (int x = 0; x < slot->bitmap.width; x++) {

Change-Id: Idb58f9e5895aac8c02163870d7c7d4a49237086b
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
This commit is contained in:
Sérgio Martins 2014-11-29 21:15:07 +00:00
parent 68cab0b250
commit 9d2edfe524

View File

@ -1123,7 +1123,7 @@ QFontEngineFT::Glyph *QFontEngineFT::loadGlyph(QGlyphSet *set, uint glyph,
while (h--) {
uint *dd = (uint *)dst;
*dd++ = 0;
for (int x = 0; x < slot->bitmap.width; x++) {
for (int x = 0; x < static_cast<int>(slot->bitmap.width); x++) {
uint a = ((src[x >> 3] & (0x80 >> (x & 7))) ? 0xffffff : 0x000000);
*dd++ = a;
}
@ -1134,7 +1134,7 @@ QFontEngineFT::Glyph *QFontEngineFT::loadGlyph(QGlyphSet *set, uint glyph,
} else if (vfactor != 1) {
while (h--) {
uint *dd = (uint *)dst;
for (int x = 0; x < slot->bitmap.width; x++) {
for (int x = 0; x < static_cast<int>(slot->bitmap.width); x++) {
uint a = ((src[x >> 3] & (0x80 >> (x & 7))) ? 0xffffff : 0x000000);
*dd++ = a;
}
@ -1143,7 +1143,7 @@ QFontEngineFT::Glyph *QFontEngineFT::loadGlyph(QGlyphSet *set, uint glyph,
}
} else {
while (h--) {
for (int x = 0; x < slot->bitmap.width; x++) {
for (int x = 0; x < static_cast<int>(slot->bitmap.width); x++) {
unsigned char a = ((src[x >> 3] & (0x80 >> (x & 7))) ? 0xff : 0x00);
dst[x] = a;
}