summaryrefslogtreecommitdiffstats
path: root/src/gui/text
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2012-09-12 12:13:35 +0200
committerQt by Nokia <qt-info@nokia.com>2012-09-14 01:01:47 +0200
commit3a13f3f16e45288f7717dcfe3e968e5cccc05d90 (patch)
treef1499dbe54501ec13836d948fef47ad01977a59a /src/gui/text
parent25ba7b8e2d8c804d8daca2a9466c9dc375488b1d (diff)
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.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp
index a1cae54cfe..5d8ff97d80 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)