summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/text/qtextscriptengine
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/qtextscriptengine
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/qtextscriptengine')
-rw-r--r--tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp b/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp
index 5a53f09e77..f2ecd5dacb 100644
--- a/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp
+++ b/tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp
@@ -1231,6 +1231,7 @@ void tst_QTextScriptEngine::mirroredChars()
HB_Glyph rightParenthesis;
{
QTextLayout layout(s);
+ layout.setCacheEnabled(true);
layout.beginLayout();
layout.createLine();
layout.endLayout();
@@ -1267,6 +1268,7 @@ void tst_QTextScriptEngine::thaiIsolatedSaraAm()
s.append(QChar(0x0e33));
QTextLayout layout(s, QFont("Waree"));
+ layout.setCacheEnabled(true);
layout.beginLayout();
layout.createLine();
layout.endLayout();
@@ -1289,6 +1291,7 @@ void tst_QTextScriptEngine::thaiWithZWJ()
#endif
QString s(QString::fromUtf8("ร‍ร‌.ร.“ร…ร”ร\xA0ร本ร") + QChar(0x0363)/*superscript 'a', for testing Inherited class*/);
QTextLayout layout(s);
+ layout.setCacheEnabled(true);
layout.beginLayout();
layout.createLine();
layout.endLayout();
@@ -1341,6 +1344,7 @@ void tst_QTextScriptEngine::thaiMultipleVowels()
for (int i = 0; i < 10; i++)
s += s; //Repeat the string to make it more likely to crash if we have a buffer overflow
QTextLayout layout(s);
+ layout.setCacheEnabled(true);
layout.beginLayout();
layout.createLine();
layout.endLayout();