Commit 553b8839 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

GIT_SILENT: UTF-8 is the new default for QTextStream

parent 24a07da4
Pipeline #49370 failed with stage
in 21 minutes
......@@ -19,7 +19,9 @@ void HtmlWriter::begin()
m_stream.reset(new QTextStream());
}
m_stream->setDevice(device());
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
m_stream->setCodec("UTF-8");
#endif
}
void HtmlWriter::write(const QString &html)
......
......@@ -71,7 +71,9 @@ void ScamDetectionDetailsDialog::slotSaveAs()
return;
}
QTextStream ts(&file);
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
ts.setCodec("UTF-8");
#endif
QString htmlStr = mDetails->toHtml();
htmlStr.replace(QLatin1String(R"(meta name="qrichtext" content="1")"),
QLatin1String(R"(meta http-equiv="Content-Type" content="text/html; charset=UTF-8")"));
......
......@@ -53,7 +53,9 @@ void WebEngineExportHtmlPageJob::slotSaveHtmlToPage(const QString &text)
return;
}
QTextStream stream(&temporaryFile);
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
stream.setCodec("UTF-8");
#endif
QString newText = text;
newText.replace(QLatin1String("<head>"), QLatin1String("<head><meta charset=\"UTF-8\">"));
stream << newText;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment