From f69c9059d6c0bfb911bf0bdcec1e7470c38fa7e2 Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Sat, 9 Mar 2013 19:28:20 +0200 Subject: Replace HB types used in API with Qt analogs hb_uint32 <-> quint32 HB_Glyph <-> glyph_t HB_Fixed <-> QFixed, HB_FixedPoint <-> QFixedPoint HB_GlyphAttributes <-> QGlyphAttributes Change-Id: I4338ec4ce9a9c20ea591606ab10e6ef4f19931b8 Reviewed-by: Lars Knoll --- src/gui/painting/qpainter.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/gui/painting/qpainter.cpp') diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index c483e93a5f..be77fffc7c 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -5612,13 +5612,13 @@ void QPainterPrivate::drawGlyphs(const quint32 *glyphArray, QFixedPoint *positio QVarLengthArray advances(glyphCount); QVarLengthArray glyphJustifications(glyphCount); - QVarLengthArray glyphAttributes(glyphCount); - memset(glyphAttributes.data(), 0, glyphAttributes.size() * sizeof(HB_GlyphAttributes)); + QVarLengthArray glyphAttributes(glyphCount); + memset(glyphAttributes.data(), 0, glyphAttributes.size() * sizeof(QGlyphAttributes)); memset(advances.data(), 0, advances.size() * sizeof(QFixed)); memset(glyphJustifications.data(), 0, glyphJustifications.size() * sizeof(QGlyphJustification)); textItem.glyphs.numGlyphs = glyphCount; - textItem.glyphs.glyphs = reinterpret_cast(const_cast(glyphArray)); + textItem.glyphs.glyphs = const_cast(glyphArray); textItem.glyphs.offsets = positions; textItem.glyphs.advances_x = advances.data(); textItem.glyphs.advances_y = advances.data(); @@ -5841,7 +5841,7 @@ void QPainter::drawText(const QPointF &p, const QString &str, int tf, int justif return; if (tf & Qt::TextBypassShaping) { - // Skip harfbuzz complex shaping, shape using glyph advances only + // Skip complex shaping, shape using glyph advances only int len = str.length(); int numGlyphs = len; QVarLengthGlyphLayoutArray glyphs(len); -- cgit v1.2.3