diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2011-03-16 16:25:47 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2011-03-16 16:25:47 (GMT) |
commit | 580e3d9968e12fb38348af503ef9ede50691c24c (patch) | |
tree | 2ae55db9989bd8147de9d25071cecbd279b847d7 /tests/auto/qtextlayout | |
parent | e318b0276c3d4a0db8660b4fa6d68f1784aee522 (diff) | |
parent | b8ded0df9c85558b93ee5ec5abd5774c87c4deed (diff) | |
download | Qt-580e3d9968e12fb38348af503ef9ede50691c24c.zip Qt-580e3d9968e12fb38348af503ef9ede50691c24c.tar.gz Qt-580e3d9968e12fb38348af503ef9ede50691c24c.tar.bz2 |
Merge remote-tracking branch 'origin/4.7' into HEAD
Conflicts:
configure
mkspecs/symbian-gcce/qmake.conf
qmake/generators/metamakefile.cpp
qmake/generators/win32/mingw_make.cpp
src/corelib/global/global.pri
src/corelib/global/qglobal.h
src/opengl/qgl.cpp
src/opengl/qwindowsurface_gl.cpp
src/plugins/platforms/wayland/qwaylandbuffer.h
tests/auto/qnetworkreply/tst_qnetworkreply.cpp
tools/designer/src/components/formeditor/qdesigner_resource.cpp
Diffstat (limited to 'tests/auto/qtextlayout')
-rw-r--r-- | tests/auto/qtextlayout/tst_qtextlayout.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/auto/qtextlayout/tst_qtextlayout.cpp b/tests/auto/qtextlayout/tst_qtextlayout.cpp index 0a14e4a..83c7094 100644 --- a/tests/auto/qtextlayout/tst_qtextlayout.cpp +++ b/tests/auto/qtextlayout/tst_qtextlayout.cpp @@ -126,6 +126,7 @@ private slots: void textWidthVsWIdth(); void textWithSurrogates_qtbug15679(); void textWidthWithStackedTextEngine(); + void textWidthWithLineSeparator(); private: QFont testFont; @@ -1443,5 +1444,21 @@ void tst_QTextLayout::textWidthWithStackedTextEngine() QCOMPARE(line.naturalTextWidth(), fm.width(text)); } +void tst_QTextLayout::textWidthWithLineSeparator() +{ + QString s1("Save Project"), s2("Save Project\ntest"); + s2.replace('\n', QChar::LineSeparator); + + QTextLayout layout1(s1), layout2(s2); + layout1.beginLayout(); + layout2.beginLayout(); + + QTextLine line1 = layout1.createLine(); + QTextLine line2 = layout2.createLine(); + line1.setLineWidth(0x1000); + line2.setLineWidth(0x1000); + QCOMPARE(line1.naturalTextWidth(), line2.naturalTextWidth()); +} + QTEST_MAIN(tst_QTextLayout) #include "tst_qtextlayout.moc" |