]>
Commit | Line | Data |
---|---|---|
6f2a45de AM |
1 | commit 3a13f3f16e45288f7717dcfe3e968e5cccc05d90 |
2 | Author: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | |
3 | Date: Wed Sep 12 12:13:35 2012 +0200 | |
4 | ||
5 | Fix regression in QTextDocument::toHtml() with font pixel size | |
6 | ||
7 | Introduced by 2e0003eda4783f69a40fb4b31e7084c761d9640d. We were | |
8 | missing a attributesEmitted=true which caused the output from | |
9 | toHtml() to sometimes be invalid when using pixel sizes to | |
10 | specify the font size. | |
11 | ||
12 | This is a back-port of e640ebacb97f6eea9614925b1da3b97a0ff51409 | |
13 | from Qt 5. | |
14 | ||
15 | Task-number: QTBUG-25778 | |
16 | Change-Id: Ied61fcaef425a590d71c0b52292ac676cb88ba52 | |
17 | Reviewed-by: Jiang Jiang <gzjjgod@gmail.com> | |
18 | ||
19 | diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp | |
20 | index a1cae54..5d8ff97 100644 | |
21 | --- a/src/gui/text/qtextdocument.cpp | |
22 | +++ b/src/gui/text/qtextdocument.cpp | |
23 | @@ -2187,6 +2187,7 @@ bool QTextHtmlExporter::emitCharFormatStyle(const QTextCharFormat &format) | |
24 | html += QLatin1String(" font-size:"); | |
25 | html += QString::number(format.intProperty(QTextFormat::FontPixelSize)); | |
26 | html += QLatin1String("px;"); | |
27 | + attributesEmitted = true; | |
28 | } | |
29 | ||
30 | if (format.hasProperty(QTextFormat::FontWeight) | |
31 |