summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2025-07-01 11:25:19 +0200
committerMarc Mutz <marc.mutz@qt.io>2025-07-01 19:50:42 +0200
commit3f4938e91d6fd47fed3cc40ed7d3dd946570f25f (patch)
tree6ae4e1c78cad1ed7ae16376801582fe4a5131184 /src
parent3d717e4e7011b1a5e418b9e1c15ae95a766df957 (diff)
QXmlStreamReader: fix a missing std::move()
Coverity (rightfully) complains that the assignment uses the copy- and not the move-assignment operator. Fix by adding the missing move(). Amends 927798f5deb0bd95fc8ce5be9fb0cfceef94a46b. Coverity-Id: 481486 Pick-to: 6.10 Change-Id: I9044847abb88adaaa55f49e7578290d11ddb8655 Reviewed-by: Magdalena Stojek <magdalena.stojek@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/serialization/qxmlstream.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/serialization/qxmlstream.cpp b/src/corelib/serialization/qxmlstream.cpp
index ad9e1089bfe..fec5b5b4363 100644
--- a/src/corelib/serialization/qxmlstream.cpp
+++ b/src/corelib/serialization/qxmlstream.cpp
@@ -2036,7 +2036,7 @@ void QXmlStreamReaderPrivate::startDocument()
// unspecified (i.e. System) encoding.
QString buf = decoder(QByteArrayView(rawReadBuffer).first(nbytesread));
if (!decoder.hasError())
- readBuffer = buf;
+ readBuffer = std::move(buf);
}
}
}