summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp')
-rw-r--r--tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp b/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp
index 4e3d1da8fe..9c477589f9 100644
--- a/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp
+++ b/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp
@@ -137,6 +137,7 @@ private slots:
void nbspWithFormat();
void noModificationOfInputString();
void superscriptCrash_qtbug53911();
+ void showLineAndParagraphSeparatorsCrash();
private:
QFont testFont;
@@ -2199,6 +2200,23 @@ void tst_QTextLayout::noModificationOfInputString()
}
}
+void tst_QTextLayout::showLineAndParagraphSeparatorsCrash()
+{
+ QString s = QString(100000, QChar('a')) + QChar(QChar::LineSeparator);
+ {
+ QTextLayout layout;
+ layout.setText(s);
+
+ QTextOption option;
+ option.setFlags(QTextOption::ShowLineAndParagraphSeparators);
+ layout.setTextOption(option);
+
+ layout.beginLayout();
+ layout.createLine();
+ layout.endLayout();
+ }
+}
+
void tst_QTextLayout::superscriptCrash_qtbug53911()
{
static int fontSizes = 64;