summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-08-02 07:36:00 (GMT)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-08-02 07:44:10 (GMT)
commit43f37074391b338b250883dfeb4a16844ca759fd (patch)
tree0aa0d386a888888f5fa4eff31f5d43bb1a0c11cd /src
parent759fe35812975104f3b73934d7d179159ce9effa (diff)
downloadQt-43f37074391b338b250883dfeb4a16844ca759fd.zip
Qt-43f37074391b338b250883dfeb4a16844ca759fd.tar.gz
Qt-43f37074391b338b250883dfeb4a16844ca759fd.tar.bz2
Fix crash when setting font decorations on text drawn with QStaticText
Qt has a run-time assert for implementing drawPolygon() in any subclass of QPaintEngine, which will be hit if set font decorations on the font used by QStaticText. Since we don't care about line decorations or any other shapes drawn in the QTextLayout, we simply leave the implementation empty. Reviewed-by: Gunnar
Diffstat (limited to 'src')
-rw-r--r--src/gui/text/qstatictext.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/text/qstatictext.cpp b/src/gui/text/qstatictext.cpp
index f6daed8..7396bcd 100644
--- a/src/gui/text/qstatictext.cpp
+++ b/src/gui/text/qstatictext.cpp
@@ -472,7 +472,12 @@ namespace {
memcpy(charsDestination, ti.chars, sizeof(QChar) * currentItem.numChars);
m_items.append(currentItem);
- }
+ }
+
+ virtual void drawPolygon(const QPointF *, int , PolygonDrawMode )
+ {
+ /* intentionally empty */
+ }
virtual bool begin(QPaintDevice *) { return true; }
virtual bool end() { return true; }