diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2012-09-12 10:13:35 (GMT) |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-09-13 23:01:47 (GMT) |
commit | 3a13f3f16e45288f7717dcfe3e968e5cccc05d90 (patch) | |
tree | f1499dbe54501ec13836d948fef47ad01977a59a /src/gui/text | |
parent | 25ba7b8e2d8c804d8daca2a9466c9dc375488b1d (diff) | |
download | Qt-3a13f3f16e45288f7717dcfe3e968e5cccc05d90.zip Qt-3a13f3f16e45288f7717dcfe3e968e5cccc05d90.tar.gz Qt-3a13f3f16e45288f7717dcfe3e968e5cccc05d90.tar.bz2 |
Fix regression in QTextDocument::toHtml() with font pixel size
Introduced by 2e0003eda4783f69a40fb4b31e7084c761d9640d. We were
missing a attributesEmitted=true which caused the output from
toHtml() to sometimes be invalid when using pixel sizes to
specify the font size.
This is a back-port of e640ebacb97f6eea9614925b1da3b97a0ff51409
from Qt 5.
Task-number: QTBUG-25778
Change-Id: Ied61fcaef425a590d71c0b52292ac676cb88ba52
Reviewed-by: Jiang Jiang <gzjjgod@gmail.com>
Diffstat (limited to 'src/gui/text')
-rw-r--r-- | src/gui/text/qtextdocument.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp index a1cae54..5d8ff97 100644 --- a/src/gui/text/qtextdocument.cpp +++ b/src/gui/text/qtextdocument.cpp @@ -2187,6 +2187,7 @@ bool QTextHtmlExporter::emitCharFormatStyle(const QTextCharFormat &format) html += QLatin1String(" font-size:"); html += QString::number(format.intProperty(QTextFormat::FontPixelSize)); html += QLatin1String("px;"); + attributesEmitted = true; } if (format.hasProperty(QTextFormat::FontWeight) |