diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-09-07 13:08:25 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-09-07 13:08:36 +0200 |
commit | 551f73bd8d745881e70a7808385f1a35c2d12b2a (patch) | |
tree | a082a94d64b5a8568143f34a0f00db374e188022 /tests/auto/gui | |
parent | d1a22bd29856807805fa56608d2953c072df0cf1 (diff) | |
parent | a9db7290956f5674992233d792e6dfd312ec1e53 (diff) |
Merge "Merge remote-tracking branch 'origin/5.12.5' into 5.12"
Diffstat (limited to 'tests/auto/gui')
-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 9c477589f9..f0a32c2ed4 100644 --- a/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp +++ b/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp @@ -138,6 +138,7 @@ private slots: void noModificationOfInputString(); void superscriptCrash_qtbug53911(); void showLineAndParagraphSeparatorsCrash(); + void tooManyDirectionalCharctersCrash_qtbug77819(); private: QFont testFont; @@ -2309,5 +2310,21 @@ void tst_QTextLayout::nbspWithFormat() QCOMPARE(layout.lineAt(1).textLength(), s2.length() + 1 + s3.length()); } +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" |