diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-09-09 09:30:43 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2019-09-09 07:51:49 +0000 |
commit | 1d53b6d9f2d7d0427ff56cfa50d98ac97f99c1bc (patch) | |
tree | d270812c4b648f51090e1262972846b1b4de8116 /tests/auto/gui/text | |
parent | 89d0a03c067b42155b1a2d310f8514f595abfd61 (diff) | |
parent | 5cea83a8a2fc3384bb07a7265c8d907171cb1ea4 (diff) |
Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts:
tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp
Change-Id: Idd3ca5cb9a2b95a4c3513b2a4c8966e6f56193f1
Diffstat (limited to 'tests/auto/gui/text')
-rw-r--r-- | tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp b/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp index aee2f970fe..a474acd790 100644 --- a/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp +++ b/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp @@ -139,6 +139,7 @@ private slots: void superscriptCrash_qtbug53911(); void showLineAndParagraphSeparatorsCrash(); void koreanWordWrap(); + void tooManyDirectionalCharctersCrash_qtbug77819(); private: QFont testFont; @@ -2330,5 +2331,21 @@ void tst_QTextLayout::koreanWordWrap() QCOMPARE(layout.lineAt(1).textLength(), 4); } +void tst_QTextLayout::tooManyDirectionalCharctersCrash_qtbug77819() +{ + QString data; + data += QString::fromUtf8("\xe2\x81\xa8"); // U+2068 FSI character + data += QString::fromUtf8("\xe2\x81\xa7"); // U+2067 RLI character + + // duplicating the text + for (int i = 0; i < 10; i++) + data += data; + + // Nothing to test. It must not crash in beginLayout(). + QTextLayout tl(data); + tl.beginLayout(); + tl.endLayout(); +} + QTEST_MAIN(tst_QTextLayout) #include "tst_qtextlayout.moc" |