From 00898f5df8cf885f0080cd8e13ba435a36758df3 Mon Sep 17 00:00:00 2001 From: Jiang Jiang Date: Wed, 8 Jun 2011 09:58:37 +0200 Subject: Revert 36e01e69 The way we handle glyph cache in QFontEngineFT has changed, the memory leak fix should not be applied to 4.8. Reviewed-by: Eskil --- src/gui/text/qfontengine_ft.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp index f514942..776615c 100644 --- a/src/gui/text/qfontengine_ft.cpp +++ b/src/gui/text/qfontengine_ft.cpp @@ -1751,7 +1751,6 @@ glyph_metrics_t QFontEngineFT::alphaMapBoundingBox(glyph_t glyph, QFixed subPixe } else { glyphSet = &defaultGlyphSet; } - bool needsDelete = false; Glyph * g = glyphSet->getGlyph(glyph); if (!g || g->format != format) { face = lockFace(); @@ -1759,7 +1758,6 @@ glyph_metrics_t QFontEngineFT::alphaMapBoundingBox(glyph_t glyph, QFixed subPixe FT_Matrix_Multiply(&glyphSet->transformationMatrix, &m); freetype->matrix = m; g = loadGlyph(glyphSet, glyph, subPixelPosition, format); - needsDelete = true; } if (g) { @@ -1768,8 +1766,6 @@ glyph_metrics_t QFontEngineFT::alphaMapBoundingBox(glyph_t glyph, QFixed subPixe overall.width = g->width; overall.height = g->height; overall.xoff = g->advance; - if (needsDelete) - delete g; } else { int left = FLOOR(face->glyph->metrics.horiBearingX); int right = CEIL(face->glyph->metrics.horiBearingX + face->glyph->metrics.width); -- cgit v0.12