Commit ee68fcdc authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

GIT_SILENT: UTF-8 is the new default for QTextStream

parent 074472de
Pipeline #49372 failed with stage
in 8 minutes and 5 seconds
...@@ -84,7 +84,9 @@ bool HtmlExport::save(QTextStream *ts) ...@@ -84,7 +84,9 @@ bool HtmlExport::save(QTextStream *ts)
if (!d->mSettings) { if (!d->mSettings) {
return false; return false;
} }
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
ts->setCodec("UTF-8"); ts->setCodec("UTF-8");
#endif
// Write HTML header // Write HTML header
*ts << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" "; *ts << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" ";
*ts << "\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">" << returnEndLine(); *ts << "\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">" << returnEndLine();
......
...@@ -29,7 +29,9 @@ Grantlee::Template QtResourceTemplateLoader::loadByName(const QString &fileName, ...@@ -29,7 +29,9 @@ Grantlee::Template QtResourceTemplateLoader::loadByName(const QString &fileName,
} }
QTextStream fstream(&file); QTextStream fstream(&file);
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
fstream.setCodec("UTF-8"); fstream.setCodec("UTF-8");
#endif
const auto fileContent = fstream.readAll(); const auto fileContent = fstream.readAll();
return engine->newTemplate(fileContent, fileName); return engine->newTemplate(fileContent, fileName);
......
Supports Markdown
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