diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-05-20 09:54:26 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-05-20 09:54:26 (GMT) |
commit | fb1d0fe4b84c02b2a443b128e663c34da9a5c8c0 (patch) | |
tree | 9bd6d01d3539be9e9f1f988b6e1be38e78feb474 /tests | |
parent | e1ad99f336a6539e0ff481bbd3c18c533650766a (diff) | |
parent | d80949eee06ff464d58bd97a6c89bae7e961f3c8 (diff) | |
download | Qt-fb1d0fe4b84c02b2a443b128e663c34da9a5c8c0.zip Qt-fb1d0fe4b84c02b2a443b128e663c34da9a5c8c0.tar.gz Qt-fb1d0fe4b84c02b2a443b128e663c34da9a5c8c0.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2:
Fix ligature offset in multi-line text
Make selection work across ligatures
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qtextlayout/tst_qtextlayout.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/auto/qtextlayout/tst_qtextlayout.cpp b/tests/auto/qtextlayout/tst_qtextlayout.cpp index ad33b70..964679a 100644 --- a/tests/auto/qtextlayout/tst_qtextlayout.cpp +++ b/tests/auto/qtextlayout/tst_qtextlayout.cpp @@ -126,6 +126,7 @@ private slots: void textWidthWithStackedTextEngine(); void textWidthWithLineSeparator(); void textWithSurrogates_qtbug15679(); + void cursorInLigatureWithMultipleLines(); private: QFont testFont; @@ -1436,5 +1437,21 @@ void tst_QTextLayout::textWithSurrogates_qtbug15679() QCOMPARE(x[2] - x[0], x[5] - x[3]); } +void tst_QTextLayout::cursorInLigatureWithMultipleLines() +{ +#if !defined(Q_WS_MAC) + QSKIP("This test can only be run on Mac", SkipAll); +#endif + QTextLayout layout("first line finish", QFont("Times", 20)); + layout.beginLayout(); + QTextLine line = layout.createLine(); + line.setLineWidth(70); + line = layout.createLine(); + layout.endLayout(); + + // The second line will be "finish", with "fi" as a ligature + QVERIFY(line.cursorToX(0) != line.cursorToX(1)); +} + QTEST_MAIN(tst_QTextLayout) #include "tst_qtextlayout.moc" |