diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2011-02-28 11:54:57 (GMT) |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2011-02-28 11:54:57 (GMT) |
commit | 987ab4d6caf05a81304deb1e46f91ff34c648a3c (patch) | |
tree | 97074a9613d4ec057cc3db663227858b14e97182 /tests | |
parent | e77e820191919aaf54c85f599cf71cfbecd1ee14 (diff) | |
parent | 388c57c0a1f53cd4a98aa12841eac603332dfe54 (diff) | |
download | Qt-987ab4d6caf05a81304deb1e46f91ff34c648a3c.zip Qt-987ab4d6caf05a81304deb1e46f91ff34c648a3c.tar.gz Qt-987ab4d6caf05a81304deb1e46f91ff34c648a3c.tar.bz2 |
Merge branch 'graphics-team-text-4.7' into 4.7
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qtextlayout/tst_qtextlayout.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/auto/qtextlayout/tst_qtextlayout.cpp b/tests/auto/qtextlayout/tst_qtextlayout.cpp index d6cf54c..0f1ff66 100644 --- a/tests/auto/qtextlayout/tst_qtextlayout.cpp +++ b/tests/auto/qtextlayout/tst_qtextlayout.cpp @@ -123,7 +123,7 @@ private slots: void testLineBreakingAllSpaces(); void lineWidthFromBOM(); void textWidthVsWIdth(); - + void textWidthWithStackedTextEngine(); private: QFont testFont; @@ -1388,6 +1388,16 @@ void tst_QTextLayout::textWidthVsWIdth() } } +void tst_QTextLayout::textWidthWithStackedTextEngine() +{ + QString text = QString::fromUtf8("คลิก ถัดไป เพื่อดำเนินการต่อ"); + QTextLayout layout(text); + layout.beginLayout(); + QTextLine line = layout.createLine(); + layout.endLayout(); + QFontMetricsF fm(layout.font()); + QCOMPARE(line.naturalTextWidth(), fm.width(text)); +} QTEST_MAIN(tst_QTextLayout) #include "tst_qtextlayout.moc" |