summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/text/qtextdocument.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp
index febd5da488..bb4f031415 100644
--- a/src/gui/text/qtextdocument.cpp
+++ b/src/gui/text/qtextdocument.cpp
@@ -2430,7 +2430,7 @@ bool QTextHtmlExporter::emitCharFormatStyle(const QTextCharFormat &format)
html += QLatin1Char(';');
attributesEmitted = true;
} else {
- html.chop(qstrlen(decorationTag.latin1()));
+ html.chop(decorationTag.size());
}
if (format.foreground() != defaultCharFormat.foreground()
@@ -2665,7 +2665,7 @@ void QTextHtmlExporter::emitFragment(const QTextFragment &fragment)
if (attributesEmitted)
html += QLatin1String("\">");
else
- html.chop(qstrlen(styleTag.latin1()));
+ html.chop(styleTag.size());
if (isObject) {
for (int i = 0; isImage && i < txt.length(); ++i) {
@@ -3227,7 +3227,7 @@ void QTextHtmlExporter::emitFrameStyle(const QTextFrameFormat &format, FrameType
QString::number(format.rightMargin()));
if (html.length() == originalHtmlLength) // nothing emitted?
- html.chop(qstrlen(styleAttribute.latin1()));
+ html.chop(styleAttribute.size());
else
html += QLatin1Char('\"');
}