summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2012-05-15 20:02:53 +0300
committerQt by Nokia <qt-info@nokia.com>2012-05-16 19:38:01 +0200
commit279562172d2e998e910d82599255cb04b54df823 (patch)
tree39d459e9e6f97a80a156b1efbfb9956dfac1b137 /src/widgets
parent6eae3e1da3ebaf8023f85c62f2fdd177fa39e208 (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/widgets')
-rw-r--r--src/widgets/widgets/qwidgetlinecontrol.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/widgets/widgets/qwidgetlinecontrol.cpp b/src/widgets/widgets/qwidgetlinecontrol.cpp
index 6347593efe..6920354e73 100644
--- a/src/widgets/widgets/qwidgetlinecontrol.cpp
+++ b/src/widgets/widgets/qwidgetlinecontrol.cpp
@@ -351,6 +351,7 @@ void QWidgetLineControl::_q_deleteSelected()
*/
void QWidgetLineControl::init(const QString &txt)
{
+ m_textLayout.setCacheEnabled(true);
m_text = txt;
updateDisplayText();
m_cursor = m_text.length();