diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp index 71511257f51..463026ed238 100644 --- a/src/gui/text/qtextdocument.cpp +++ b/src/gui/text/qtextdocument.cpp @@ -2372,6 +2372,8 @@ QString QTextHtmlExporter::toHtml(ExportMode mode) html += ""_L1; html += ""_L1; + html += "\">\n"_L1; } html += "blockFormat.setMarker(QTextBlockFormat::MarkerType::Unchecked); + else if (value == "checked"_L1) + node->blockFormat.setMarker(QTextBlockFormat::MarkerType::Checked); + } + break; case Html_a: if (key == "href"_L1) node->charFormat.setAnchorHref(value); diff --git a/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp b/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp index ad9e1965b6c..d10027b7a01 100644 --- a/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp +++ b/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp @@ -274,6 +274,8 @@ void tst_QTextDocument::init() "" "\n"); htmlHead = htmlHead.arg(defaultFont.family()) @@ -1371,7 +1373,7 @@ void tst_QTextDocument::toHtml_data() QTest::newRow("lists") << QTextDocumentFragment(&doc) << QString("EMPTYBLOCK") + - QString(""); + QString(""); } { @@ -1394,7 +1396,7 @@ void tst_QTextDocument::toHtml_data() QTest::newRow("charfmt-for-list-item") << QTextDocumentFragment(&doc) << QString("EMPTYBLOCK") + - QString(""); + QString(""); } { @@ -1424,7 +1426,7 @@ void tst_QTextDocument::toHtml_data() QTest::newRow("list-indent") << QTextDocumentFragment(&doc) << QString("EMPTYBLOCK") + - QString(""); + QString(""); } { @@ -1712,7 +1714,7 @@ void tst_QTextDocument::toHtml_data() QTest::newRow("list-ul-margin") << QTextDocumentFragment(&doc) << QString("EMPTYBLOCK") + - QString(""); + QString(""); } { CREATE_DOC_AND_CURSOR(); @@ -1722,12 +1724,12 @@ void tst_QTextDocument::toHtml_data() cursor.insertHtml(listHtml); QTest::newRow("nested-lists-one") << QTextDocumentFragment(&doc) - << QString("