Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
4.8.1
-
None
-
e640ebacb97f6eea9614925b1da3b97a0ff51409, 3a13f3f16e45288f7717dcfe3e968e5cccc05d90
Description
A simple TextDocument has a text block with text "Some Text", toHtml output:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'SimSun'; font-size:16px; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" foSome Text</p></body></html>
I suppose someone forggotten add "attributesEmitted = true;" in block qtextdocument.cpp line 2186-2190. It should be:
} else if (format.hasProperty(QTextFormat::FontPixelSize)) { html += QLatin1String(" font-size:"); html += QString::number(format.intProperty(QTextFormat::FontPixelSize)); html += QLatin1String("px;"); attributesEmitted = true; }