summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-01-20 12:31:38 (GMT)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-01-20 12:31:38 (GMT)
commit20f1d1e7d3178a5fe67e3fd7a8ba80a9fc134a50 (patch)
treeaac8c4cf6332d33ee8f6d02a162fffc6ef7b7d2b
parent3c902c0436c68d0c689a813fbef009ac4689b3c4 (diff)
downloadQt-20f1d1e7d3178a5fe67e3fd7a8ba80a9fc134a50.zip
Qt-20f1d1e7d3178a5fe67e3fd7a8ba80a9fc134a50.tar.gz
Qt-20f1d1e7d3178a5fe67e3fd7a8ba80a9fc134a50.tar.bz2
Compile
Compile QStaticText and also use font object in QPaintBuffer since it's now available
-rw-r--r--src/gui/painting/qpaintbuffer.cpp7
-rw-r--r--src/gui/text/qstatictext.cpp2
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;