qt5base-lts/tests/auto/qtextdocument
Eskil Abrahamsen Blomfeldt 11bbfb5882 Fix missing empty lines in Qt HTML when displayed in compliant browsers
When QTextDocument exports HTML, it makes an effort to be compatible
with its own importer, hence it has to be compatible with the dialect
of HTML which Qt has developed over the years. One incorrect
interpretation in Qt is that an empty paragraph is interpreted as an
empty line. So if you use a QTextDocument to produce HTML for text where
an empty line has been added, this empty line will not be visible when
the document is viewed in a compliant browser. The fix is to set the
height of the empty paragraph to 1em, so that it will match the current
pixel size of the font, thus look the same as a <p><br /></p> but
without altering the structure of the document.

Reviewed-by: Gunnar
(cherry picked from commit f541c78e1bc5b293466b40e6f10496199a4a5d73)

Change-Id: Ic0eae2c81609b8872eb2eb9344a3ec416cd09149
Reviewed-on: http://codereview.qt.nokia.com/445
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2011-06-10 12:04:16 +02:00
..
.gitignore Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
common.h Update licenseheader text in source files for qtbase Qt module 2011-05-24 12:34:08 +03:00
qtextdocument.pro tests: fix private header inclusion in qtbase autotests 2011-05-11 17:04:19 +10:00
tst_qtextdocument.cpp Fix missing empty lines in Qt HTML when displayed in compliant browsers 2011-06-10 12:04:16 +02:00