summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-06-17 09:13:15 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-06-17 09:13:15 (GMT)
commit0adaa5fd48b39b83e2e2b7693cbc2452e2076c15 (patch)
tree14e299e9f671e23b9e130bd70452aaed6125e5a5 /tests/auto
parent75edecadeeddb069711c28ff89834ea899bb2757 (diff)
parent8af2f7b5085ee56d289584bddbccc8dead04b9d1 (diff)
downloadQt-0adaa5fd48b39b83e2e2b7693cbc2452e2076c15.zip
Qt-0adaa5fd48b39b83e2e2b7693cbc2452e2076c15.tar.gz
Qt-0adaa5fd48b39b83e2e2b7693cbc2452e2076c15.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Fix possible crash in QTextLayout for glyphless items
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qtextlayout/tst_qtextlayout.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/auto/qtextlayout/tst_qtextlayout.cpp b/tests/auto/qtextlayout/tst_qtextlayout.cpp
index caf9bd3..6d27ef2 100644
--- a/tests/auto/qtextlayout/tst_qtextlayout.cpp
+++ b/tests/auto/qtextlayout/tst_qtextlayout.cpp
@@ -110,6 +110,7 @@ private slots:
void longText();
void widthOfTabs();
void columnWrapWithTabs();
+ void glyphLessItems();
// QTextLine stuff
void setNumColumnsWrapAtWordBoundaryOrAnywhere();
@@ -1319,6 +1320,24 @@ void tst_QTextLayout::lineWidthFromBOM()
// Don't spin into an infinite loop
}
+void tst_QTextLayout::glyphLessItems()
+{
+ {
+ QTextLayout layout;
+ layout.setText("\t\t");
+ layout.beginLayout();
+ layout.createLine();
+ layout.endLayout();
+ }
+
+ {
+ QTextLayout layout;
+ layout.setText(QString::fromLatin1("AA") + QChar(QChar::LineSeparator));
+ layout.beginLayout();
+ layout.createLine();
+ layout.endLayout();
+ }
+}
QTEST_MAIN(tst_QTextLayout)
#include "tst_qtextlayout.moc"