summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtextodfwriter.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-04-07 09:13:01 +0200
committerLars Knoll <lars.knoll@qt.io>2020-04-21 15:46:29 +0200
commita23cb5cd06bcc3268387cb1abaa0dc2c2d3b13f4 (patch)
tree404184e2121719936611d498debac69942790b5b /src/gui/text/qtextodfwriter.cpp
parent29de3412ad611b1091903dce3ec53d5afe992589 (diff)
Always save QTextDocuments encoded in utf-8
Get rid of the options to set another encoding. In 2020, we should always write documents as utf-8. Change-Id: If39dd3a876f85a70735169113bce9c25f2d981b3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/gui/text/qtextodfwriter.cpp')
-rw-r--r--src/gui/text/qtextodfwriter.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/gui/text/qtextodfwriter.cpp b/src/gui/text/qtextodfwriter.cpp
index be13615aa6..1613fa201c 100644
--- a/src/gui/text/qtextodfwriter.cpp
+++ b/src/gui/text/qtextodfwriter.cpp
@@ -998,7 +998,6 @@ QTextOdfWriter::QTextOdfWriter(const QTextDocument &document, QIODevice *device)
m_document(&document),
m_device(device),
m_strategy(nullptr),
- m_codec(nullptr),
m_createArchive(true)
{
}
@@ -1015,10 +1014,6 @@ bool QTextOdfWriter::writeAll()
return false;
}
QXmlStreamWriter writer(m_strategy->contentStream);
-#if QT_CONFIG(textcodec)
- if (m_codec)
- writer.setCodec(m_codec);
-#endif
// prettyfy
writer.setAutoFormatting(true);
writer.setAutoFormattingIndent(2);