src/corelib/xml/qxmlstream.cpp
changeset 37 758a864f9613
parent 33 3e2da88830cd
equal deleted inserted replaced
36:ef0373b55136 37:758a864f9613
  1521         codec = QTextCodec::codecForMib(mib);
  1521         codec = QTextCodec::codecForMib(mib);
  1522         Q_ASSERT(codec);
  1522         Q_ASSERT(codec);
  1523         decoder = codec->makeDecoder();
  1523         decoder = codec->makeDecoder();
  1524     }
  1524     }
  1525 
  1525 
  1526     decoder->toUnicode(&readBuffer, rawReadBuffer.data(), nbytesread);
  1526     decoder->toUnicode(&readBuffer, rawReadBuffer.constData(), nbytesread);
  1527 
  1527 
  1528     if(lockEncoding && decoder->hasFailure()) {
  1528     if(lockEncoding && decoder->hasFailure()) {
  1529         raiseWellFormedError(QXmlStream::tr("Encountered incorrectly encoded content."));
  1529         raiseWellFormedError(QXmlStream::tr("Encountered incorrectly encoded content."));
  1530         readBuffer.clear();
  1530         readBuffer.clear();
  1531         return 0;
  1531         return 0;