summaryrefslogtreecommitdiffstats
path: root/src/xml
diff options
context:
space:
mode:
Diffstat (limited to 'src/xml')
-rw-r--r--src/xml/dom/qdom.cpp2
-rw-r--r--src/xml/sax/qxml.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/xml/dom/qdom.cpp b/src/xml/dom/qdom.cpp
index dd9bb4f875..9affd697a0 100644
--- a/src/xml/dom/qdom.cpp
+++ b/src/xml/dom/qdom.cpp
@@ -6442,7 +6442,7 @@ void QDomDocumentPrivate::saveDocument(QTextStream& s, const int indent, QDomNod
if (enc.isEmpty())
enc = encoding.cap(5);
if (!enc.isEmpty())
- codec = QTextCodec::codecForName(enc.toLatin1().data());
+ codec = QTextCodec::codecForName(std::move(enc).toLatin1());
}
if (!codec)
codec = QTextCodec::codecForName("UTF-8");
diff --git a/src/xml/sax/qxml.cpp b/src/xml/sax/qxml.cpp
index 1724076b84..bc7d00483a 100644
--- a/src/xml/sax/qxml.cpp
+++ b/src/xml/sax/qxml.cpp
@@ -1407,7 +1407,7 @@ QString QXmlInputSource::fromRawData(const QByteArray &data, bool beginning)
QString encoding = extractEncodingDecl(d->encodingDeclChars, &needMoreText);
if (!encoding.isEmpty()) {
- if (QTextCodec *codec = QTextCodec::codecForName(encoding.toLatin1())) {
+ if (QTextCodec *codec = QTextCodec::codecForName(std::move(encoding).toLatin1())) {
/* If the encoding is the same, we don't have to do toUnicode() all over again. */
if(codec->mibEnum() != mib) {
delete d->encMapper;