diff options
Diffstat (limited to 'tests/auto/gui')
-rw-r--r-- | tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp | 4 | ||||
-rw-r--r-- | tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp | 12 |
2 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp b/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp index 69c961c1a1..c90348e91a 100644 --- a/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp +++ b/tests/auto/gui/painting/qpainterpath/tst_qpainterpath.cpp @@ -189,6 +189,10 @@ void tst_QPainterPath::reserveAndCapacity() p.reserve(0); QVERIFY(p.capacity() >= 1000); + + QPainterPath p2; + p2.reserve(10); + QVERIFY(p.capacity() >= 10); } Q_DECLARE_METATYPE(QPainterPath) 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); |