From e640ebacb97f6eea9614925b1da3b97a0ff51409 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Wed, 12 Sep 2012 12:13:35 +0200 Subject: 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. Task-number: QTBUG-25778 Change-Id: Ied61fcaef425a590d71c0b52292ac676cb88ba52 Reviewed-by: Qt Doc Bot Reviewed-by: Jiang Jiang --- src/gui/text/qtextdocument.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp index 3203f85cc9..19c75b7b39 100644 --- a/src/gui/text/qtextdocument.cpp +++ b/src/gui/text/qtextdocument.cpp @@ -2142,6 +2142,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) -- cgit v1.2.3