diff options
author | Konstantin Ritt <ritt.ks@gmail.com> | 2012-05-15 20:02:53 +0300 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-16 19:38:01 +0200 |
commit | 279562172d2e998e910d82599255cb04b54df823 (patch) | |
tree | 39d459e9e6f97a80a156b1efbfb9956dfac1b137 /src/gui/text | |
parent | 6eae3e1da3ebaf8023f85c62f2fdd177fa39e208 (diff) |
enable the text layout's cache where it is seems to be missed
e.g. in QStaticText, the data is used just to get the line's y-position
and re-calculates just after the loop to determine the bounding rect and to draw the text;
in QWidgetLineControl, the data re-calculated over and over while the result
is seems to remain the same; probably the caching is needed here too
Change-Id: I0f7eb291532f63eccb9c5f749daebb73ff90632f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Diffstat (limited to 'src/gui/text')
-rw-r--r-- | src/gui/text/qstatictext.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/text/qstatictext.cpp b/src/gui/text/qstatictext.cpp index 5bee2a9915..faee6d2b76 100644 --- a/src/gui/text/qstatictext.cpp +++ b/src/gui/text/qstatictext.cpp @@ -610,6 +610,7 @@ void QStaticTextPrivate::paintText(const QPointF &topLeftPosition, QPainter *p) textLayout.setText(text); textLayout.setFont(font); textLayout.setTextOption(textOption); + textLayout.setCacheEnabled(true); qreal leading = QFontMetricsF(font).leading(); qreal height = -leading; |