From 0ccb8ab1db1ab7e49dd0d13e94484f83c5f8dd90 Mon Sep 17 00:00:00 2001 From: Anton Kudryavtsev Date: Wed, 4 Oct 2023 14:53:30 +0300 Subject: [PATCH] qtextdocument: replace fromLatin1 with L1 literal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit to reduce allocations Change-Id: Ie6f734269c9e880ff208629a625c88f4841e9533 Reviewed-by: MÃ¥rten Nordheim --- src/gui/text/qtextdocument.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp index ea259873e2..06099ee3f7 100644 --- a/src/gui/text/qtextdocument.cpp +++ b/src/gui/text/qtextdocument.cpp @@ -2374,11 +2374,14 @@ QString QTextHtmlExporter::toHtml(ExportMode mode) fragmentMarkers = (mode == ExportFragment); - html += QString::fromLatin1(""); + html += ""_L1; QString title = doc->metaInformation(QTextDocument::DocumentTitle); - if (!title.isEmpty()) - html += QString::fromLatin1("") + title + QString::fromLatin1(""); + if (!title.isEmpty()) { + html += ""_L1; + html += title; + html += ""_L1; + } html += "