qt5base-lts/tests/auto/gui
Shawn Rutledge 7224d0e427 QTextMarkdownImporter: don't keep heading level on following list item
When reading a document like

 # heading
 - list item

and then re-writing it, it turned into

 # heading
 - # list item

because QTextCursor::insertList() simply calls QTextCursor::insertBlock(), thus
inheriting block format from the previous block, without an opportunity to
explicitly define the block format.  So be more consistent: use
QTextMarkdownImporter::insertBlock() for blocks inside list items too.  Now it
fully defines blockFormat first, then inserts the block, and then adds it to
the current list only when the "paragraph" is actually the list item's text
(but not when it's a continuation paragraph).  Also, be prepared for applying
and removing block markers to arbitrary blocks, just in case (they might be
useful for block quotes, for example).

Change-Id: I391820af9b65e75abce12abab45d2477c49c86ac
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2019-05-24 15:37:05 +02:00
..
image Migrate Windows system libs to external dependencies 2019-05-08 08:30:02 +00:00
itemmodels Fix compilation with Qt 6 2019-05-06 20:04:45 +00:00
kernel Merge remote-tracking branch 'origin/5.13' into dev 2019-05-27 15:34:10 +02:00
math3d Use qRadiansToDegrees() and qDegreesToRadians() more widely 2017-07-05 10:15:34 +00:00
painting Tests: Fix some warnings about deprecated functions not under test 2019-05-27 15:29:16 +02:00
qopengl Fix OpenGL ES2 build on Linux 2019-02-15 12:58:12 +00:00
qopenglconfig Deprecate conversion functions between QList and QSet 2019-05-07 14:15:44 +00:00
qvulkan Merge remote-tracking branch 'origin/5.10' into dev 2017-10-17 10:34:24 +02:00
text QTextMarkdownImporter: don't keep heading level on following list item 2019-05-24 15:37:05 +02:00
util Merge remote-tracking branch 'origin/5.12' into 5.13 2019-05-03 10:44:24 +02:00
gui.pro winrt: Skip/blacklist failing opengl tests 2018-05-28 08:36:55 +00:00