summaryrefslogtreecommitdiffstats
path: root/tests/auto/qtextlayout
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2011-03-01 10:23:51 +0100
committerOlivier Goffart <olivier.goffart@nokia.com>2011-03-01 10:23:51 +0100
commitee767e8c16742316068e83323374ea54f2b939cb (patch)
treebb3f6c94e6c1512545cd657d2c675a371a6a88f7 /tests/auto/qtextlayout
parent54869c8727e5403cea866c99a5f83ae9c8533f82 (diff)
parent2653c4fcf42ec93db16a299c29c9fe0f98680c75 (diff)
Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7
Conflicts: src/gui/text/qfontengine_mac.mm src/opengl/qpixmapdata_gl.cpp src/opengl/qwindowsurface_gl.cpp src/s60installs/bwins/QtOpenGLu.def src/s60installs/eabi/QtOpenGLu.def tests/auto/qtextlayout/tst_qtextlayout.cpp
Diffstat (limited to 'tests/auto/qtextlayout')
-rw-r--r--tests/auto/qtextlayout/tst_qtextlayout.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/auto/qtextlayout/tst_qtextlayout.cpp b/tests/auto/qtextlayout/tst_qtextlayout.cpp
index d1b615ed47..0a14e4a8ff 100644
--- a/tests/auto/qtextlayout/tst_qtextlayout.cpp
+++ b/tests/auto/qtextlayout/tst_qtextlayout.cpp
@@ -124,8 +124,8 @@ private slots:
void testLineBreakingAllSpaces();
void lineWidthFromBOM();
void textWidthVsWIdth();
-
void textWithSurrogates_qtbug15679();
+ void textWidthWithStackedTextEngine();
private:
QFont testFont;
@@ -1432,5 +1432,16 @@ void tst_QTextLayout::textWithSurrogates_qtbug15679()
QCOMPARE(x[2] - x[0], x[5] - x[3]);
}
+void tst_QTextLayout::textWidthWithStackedTextEngine()
+{
+ QString text = QString::fromUtf8("คลิก ถัดไป เพื่อดำเนินการต่อ");
+ QTextLayout layout(text);
+ layout.beginLayout();
+ QTextLine line = layout.createLine();
+ layout.endLayout();
+ QFontMetricsF fm(layout.font());
+ QCOMPARE(line.naturalTextWidth(), fm.width(text));
+}
+
QTEST_MAIN(tst_QTextLayout)
#include "tst_qtextlayout.moc"