summaryrefslogtreecommitdiffstats
path: root/src/xml/dom/qdom.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-04-29 18:00:13 +0200
committerLars Knoll <lars.knoll@qt.io>2020-05-14 07:51:20 +0200
commit2b8863a98c912806fd4e47bd2f2a6d81ec1d71b9 (patch)
treed0d03d309719486805cb81459401fe71aaec45c0 /src/xml/dom/qdom.cpp
parentada608d46d7ab99b787e48003f8c94c1a11dab19 (diff)
Get rid of some QTextCodec leftovers
There's no real dependency to QTextCodec in those files anymore. Change-Id: Ifaf19ab554fd108fa26095db4e2bd4a3e9ea427f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/xml/dom/qdom.cpp')
-rw-r--r--src/xml/dom/qdom.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/xml/dom/qdom.cpp b/src/xml/dom/qdom.cpp
index c09770db82..0f3e381859 100644
--- a/src/xml/dom/qdom.cpp
+++ b/src/xml/dom/qdom.cpp
@@ -52,9 +52,6 @@
#if QT_CONFIG(regularexpression)
#include <qregularexpression.h>
#endif
-#if QT_CONFIG(textcodec)
-#include <qtextcodec.h>
-#endif
#include <qtextstream.h>
#include <qxml.h>
#include <qvariant.h>
@@ -5942,7 +5939,7 @@ void QDomDocumentPrivate::saveDocument(QTextStream& s, const int indent, QDomNod
const QDomNodePrivate* n = first;
if(encUsed == QDomNode::EncodingFromDocument) {
-#if QT_CONFIG(textcodec) && QT_CONFIG(regularexpression)
+#if QT_CONFIG(regularexpression)
const QDomNodePrivate* n = first;
if (n && n->isProcessingInstruction() && n->nodeName() == QLatin1String("xml")) {
@@ -5977,11 +5974,7 @@ void QDomDocumentPrivate::saveDocument(QTextStream& s, const int indent, QDomNod
else {
// Write out the XML declaration.
-#if !QT_CONFIG(textcodec)
- const QLatin1String codecName("UTF-8");
-#else
const QByteArray codecName = QStringConverter::nameForEncoding(s.encoding());
-#endif
s << "<?xml version=\"1.0\" encoding=\""
<< codecName