From 20f1d1e7d3178a5fe67e3fd7a8ba80a9fc134a50 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Wed, 20 Jan 2010 13:31:38 +0100 Subject: Compile Compile QStaticText and also use font object in QPaintBuffer since it's now available --- src/gui/painting/qpaintbuffer.cpp | 7 ++----- src/gui/text/qstatictext.cpp | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/gui/painting/qpaintbuffer.cpp b/src/gui/painting/qpaintbuffer.cpp index e0067b0..e41ad57 100644 --- a/src/gui/painting/qpaintbuffer.cpp +++ b/src/gui/painting/qpaintbuffer.cpp @@ -965,9 +965,6 @@ void QPaintBufferEngine::drawStaticTextItem(QStaticTextItem *staticTextItem) { QString text = QString(staticTextItem->chars, staticTextItem->numChars); - QFontDef fontDef = staticTextItem->fontEngine->fontDef; - QFont font(fontDef.family, fontDef.pointSize, fontDef.weight, fontDef.style == QFont::StyleItalic); - QTransform xform; for (int i=buffer->commands.size()-1; i>=0; --i) { const QPaintBufferCommand &cmd = buffer->commands.at(i); @@ -978,10 +975,10 @@ void QPaintBufferEngine::drawStaticTextItem(QStaticTextItem *staticTextItem) } QStaticText staticText(text); - staticText.prepare(xform, font); + staticText.prepare(xform, staticTextItem->font); QVariantList variants; - variants << QVariant(font) << QVariant::fromValue(staticText); + variants << QVariant(staticTextItem->font) << QVariant::fromValue(staticText); buffer->addCommand(QPaintBufferPrivate::Cmd_DrawStaticText, QVariant(variants)); } diff --git a/src/gui/text/qstatictext.cpp b/src/gui/text/qstatictext.cpp index 4e8ab9d..db10a03 100644 --- a/src/gui/text/qstatictext.cpp +++ b/src/gui/text/qstatictext.cpp @@ -330,7 +330,7 @@ namespace { QStaticTextItem *currentItem = (m_items + (m_itemCount - 1)); currentItem->fontEngine = ti.fontEngine; - currentItem->font = ti.font; + currentItem->font = ti.font(); currentItem->chars = ti.chars; currentItem->numChars = ti.num_chars; currentItem->numGlyphs = ti.glyphs.numGlyphs; -- cgit v0.12