From b225946bc03b3defee7f8c0926788d38d901415e Mon Sep 17 00:00:00 2001 From: Peter Hartmann Date: Thu, 5 Aug 2010 11:56:47 +0200 Subject: QXmlStreamReader: avoid unnecessary detaching Reviewed-by: Markus Goetz Task-number: QTBUG-12259 (cherry picked from commit c7fcd56bd3e150e57230ea1445bf4286b3f3fabe) --- src/corelib/xml/qxmlstream.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/xml/qxmlstream.cpp b/src/corelib/xml/qxmlstream.cpp index 12db36a..e8bff9e 100644 --- a/src/corelib/xml/qxmlstream.cpp +++ b/src/corelib/xml/qxmlstream.cpp @@ -1523,7 +1523,7 @@ ushort QXmlStreamReaderPrivate::getChar_helper() decoder = codec->makeDecoder(); } - decoder->toUnicode(&readBuffer, rawReadBuffer.data(), nbytesread); + decoder->toUnicode(&readBuffer, rawReadBuffer.constData(), nbytesread); if(lockEncoding && decoder->hasFailure()) { raiseWellFormedError(QXmlStream::tr("Encountered incorrectly encoded content.")); -- cgit v0.12