Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[qtbase] Fix build with newer FreeType versions. Fixes MER#1570
Original commit
commit 9d2edfe
Author: Sérgio Martins <sergio.martins@kdab.com>
Date:   Sat Nov 29 21:15:07 2014 +0000

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>
  • Loading branch information
pvuorela committed Apr 19, 2016
1 parent be8e74a commit 16cd622
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/gui/text/qfontengine_ft.cpp
Expand Up @@ -1105,7 +1105,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;
}
Expand All @@ -1116,7 +1116,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;
}
Expand All @@ -1125,7 +1125,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;
}
Expand Down

0 comments on commit 16cd622

Please sign in to comment.