summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/text/qrawfont/tst_qrawfont.cpp
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/gui/text/qrawfont/tst_qrawfont.cpp
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/gui/text/qrawfont/tst_qrawfont.cpp')
-rw-r--r--tests/auto/gui/text/qrawfont/tst_qrawfont.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/auto/gui/text/qrawfont/tst_qrawfont.cpp b/tests/auto/gui/text/qrawfont/tst_qrawfont.cpp
index a3fe7b5368..007bf63a12 100644
--- a/tests/auto/gui/text/qrawfont/tst_qrawfont.cpp
+++ b/tests/auto/gui/text/qrawfont/tst_qrawfont.cpp
@@ -325,6 +325,7 @@ void tst_QRawFont::textLayout()
QTextLayout layout(QLatin1String("Foobar"));
layout.setFont(font);
+ layout.setCacheEnabled(true);
layout.beginLayout();
layout.createLine();
layout.endLayout();
@@ -822,6 +823,7 @@ void tst_QRawFont::unsupportedWritingSystem()
QTextLayout layout;
layout.setFont(font);
layout.setText(arabicText);
+ layout.setCacheEnabled(true);
layout.beginLayout();
layout.createLine();
layout.endLayout();
@@ -862,6 +864,7 @@ void tst_QRawFont::rawFontSetPixelSize()
font.setPixelSize(12);
layout.setFont(font);
+ layout.setCacheEnabled(true);
layout.beginLayout();
layout.createLine();
layout.endLayout();