summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-02-28 15:11:27 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-02-28 15:11:27 (GMT)
commit8b823c4edd51a52c01dec1cb9d44f712346dc583 (patch)
tree3e0e3be51775c1a8729f50ac2917c89fb8a7737d /tests
parent4bb139749a1c830ced5211eb8159ccb52a87acc1 (diff)
parent2e80c16854c97aafff229828a5dbf4b0e31d245f (diff)
downloadQt-8b823c4edd51a52c01dec1cb9d44f712346dc583.zip
Qt-8b823c4edd51a52c01dec1cb9d44f712346dc583.tar.gz
Qt-8b823c4edd51a52c01dec1cb9d44f712346dc583.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Fix Mac synthesized italic fonts clipping issue for QGLWidget Fix cursor position adjustment when removing strings Fix out of bounds handling in Mac shaper
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qtextlayout/tst_qtextlayout.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/auto/qtextlayout/tst_qtextlayout.cpp b/tests/auto/qtextlayout/tst_qtextlayout.cpp
index d6cf54c..0f1ff66 100644
--- a/tests/auto/qtextlayout/tst_qtextlayout.cpp
+++ b/tests/auto/qtextlayout/tst_qtextlayout.cpp
@@ -123,7 +123,7 @@ private slots:
void testLineBreakingAllSpaces();
void lineWidthFromBOM();
void textWidthVsWIdth();
-
+ void textWidthWithStackedTextEngine();
private:
QFont testFont;
@@ -1388,6 +1388,16 @@ void tst_QTextLayout::textWidthVsWIdth()
}
}
+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"