summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/text
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2019-06-27 14:38:03 +0200
committerLiang Qi <liang.qi@qt.io>2019-06-27 14:38:03 +0200
commit25eb97d2d450fbfe761559f1ae87a2e88c8c6b2d (patch)
treea96380908abb944ff374201321fa5a50d15b770a /tests/auto/gui/text
parentfc940b24dbe8a118e92e335c0d9c7d4194bf3d4f (diff)
parent0d6b4b519272915c2690ee12d1834823747233ab (diff)
Merge remote-tracking branch 'origin/5.13' into dev
Conflicts: .qmake.conf src/network/ssl/qsslsocket_openssl.cpp Done-With: Timur Pocheptsov <timur.pocheptsov@qt.io> Change-Id: Ibb57a0548b4977797b400637487a56245ac1c024
Diffstat (limited to 'tests/auto/gui/text')
-rw-r--r--tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp b/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp
index a07181c199..e4ee778f64 100644
--- a/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp
+++ b/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp
@@ -864,6 +864,18 @@ void tst_QTextDocument::toHtml_data()
{
CREATE_DOC_AND_CURSOR();
+ QTextCharFormat fmt;
+ fmt.setFontFamily("Times");
+ fmt.setFontFamilies(QStringList{ "Times", "serif" });
+ cursor.insertText("Blah", fmt);
+
+ QTest::newRow("font-family-with-fallback") << QTextDocumentFragment(&doc)
+ << QString("<p DEFAULTBLOCKSTYLE><span style=\" font-family:'Times','serif';\">Blah</span></p>");
+ }
+
+ {
+ CREATE_DOC_AND_CURSOR();
+
QTextBlockFormat fmt;
fmt.setNonBreakableLines(true);
cursor.insertBlock(fmt);