summaryrefslogtreecommitdiffstats
path: root/tests/auto/other
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 /tests/auto/other
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 'tests/auto/other')
-rw-r--r--tests/auto/other/qcomplextext/tst_qcomplextext.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/other/qcomplextext/tst_qcomplextext.cpp b/tests/auto/other/qcomplextext/tst_qcomplextext.cpp
index 6b418d7c46..764c75f137 100644
--- a/tests/auto/other/qcomplextext/tst_qcomplextext.cpp
+++ b/tests/auto/other/qcomplextext/tst_qcomplextext.cpp
@@ -168,6 +168,7 @@ void tst_QComplexText::bidiCursor_qtbug2795()
QTextLayout l1(str);
l1.beginLayout();
+ l1.setCacheEnabled(true);
QTextLine line1 = l1.createLine();
l1.endLayout();
@@ -175,6 +176,7 @@ void tst_QComplexText::bidiCursor_qtbug2795()
str.append("1");
QTextLayout l2(str);
+ l2.setCacheEnabled(true);
l2.beginLayout();
QTextLine line2 = l2.createLine();
l2.endLayout();
@@ -206,6 +208,7 @@ void tst_QComplexText::bidiCursorMovement()
QFETCH(int, basicDir);
QTextLayout layout(logical);
+ layout.setCacheEnabled(true);
QTextOption option = layout.textOption();
option.setTextDirection(basicDir == QChar::DirL ? Qt::LeftToRight : Qt::RightToLeft);
@@ -273,6 +276,7 @@ void tst_QComplexText::bidiCursor_PDF()
{
QString str = QString::fromUtf8("\342\200\252hello\342\200\254");
QTextLayout layout(str);
+ layout.setCacheEnabled(true);
layout.beginLayout();
QTextLine line = layout.createLine();