diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-08-15 13:09:55 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-08-15 16:53:19 +0200 |
commit | c7ec7cd2a1ae9bec31113fae1f1e549b2bf98e0b (patch) | |
tree | fc81fba4e7815ea061da277cf3bcf3102866932f /src/xml/sax/qxml.cpp | |
parent | 7947032e2d1d68b2c0f79874db7adcf560851f29 (diff) | |
parent | 6132260da394a9627947f0fe6a279c20863b6ad2 (diff) |
Merge branch 'wip/qt6' into wip/cmake
Change-Id: I50ac36b8803c296998149e98cc61e38687cdd14b
Diffstat (limited to 'src/xml/sax/qxml.cpp')
-rw-r--r-- | src/xml/sax/qxml.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/xml/sax/qxml.cpp b/src/xml/sax/qxml.cpp index 1c45118fb1..1993073cce 100644 --- a/src/xml/sax/qxml.cpp +++ b/src/xml/sax/qxml.cpp @@ -1161,12 +1161,12 @@ QChar QXmlInputSource::next() d->nextReturnedEndOfData = false; fetchData(); if (d->pos >= d->length) { - return EndOfDocument; + return QChar(EndOfDocument); } return next(); } d->nextReturnedEndOfData = true; - return EndOfData; + return QChar(EndOfData); } // QXmlInputSource has no way to signal encoding errors. The best we can do @@ -1174,7 +1174,7 @@ QChar QXmlInputSource::next() // will then just call this function again to get the next char. QChar c = d->unicode[d->pos++]; if (c.unicode() == EndOfData) - c = EndOfDocument; + c = QChar(EndOfDocument); return c; } @@ -1313,8 +1313,8 @@ static QString extractEncodingDecl(const QString &text, bool *needMoreText) return QString(); while (pos < endPos) { - ushort uc = text.at(pos).unicode(); - if (uc == '\'' || uc == '"') + QChar uc = text.at(pos); + if (uc == u'\'' || uc == u'"') break; ++pos; } @@ -1325,8 +1325,8 @@ static QString extractEncodingDecl(const QString &text, bool *needMoreText) QString encoding; ++pos; while (pos < endPos) { - ushort uc = text.at(pos).unicode(); - if (uc == '\'' || uc == '"') + QChar uc = text.at(pos); + if (uc == u'\'' || uc == u'"') break; encoding.append(uc); ++pos; @@ -7800,7 +7800,7 @@ void QXmlSimpleReaderPrivate::next() c = inputSource->next(); // If we are not incremental parsing, we just skip over EndOfData chars to give the // parser an uninterrupted stream of document chars. - if (c == QXmlInputSource::EndOfData && parseStack == nullptr) + if (c == QChar(QXmlInputSource::EndOfData) && parseStack == nullptr) c = inputSource->next(); if (uc == '\n') { lineNr++; @@ -7877,7 +7877,7 @@ void QXmlSimpleReaderPrivate::init(const QXmlInputSource *i) */ void QXmlSimpleReaderPrivate::initData() { - c = QXmlInputSource::EndOfData; + c = QChar(QXmlInputSource::EndOfData); xmlRefStack.clear(); next(); } @@ -7925,7 +7925,7 @@ void QXmlSimpleReaderPrivate::unexpectedEof(ParseFunction where, int state) if (parseStack == nullptr) { reportParseError(QLatin1String(XMLERR_UNEXPECTEDEOF)); } else { - if (c == QXmlInputSource::EndOfDocument) { + if (c == QChar(QXmlInputSource::EndOfDocument)) { reportParseError(QLatin1String(XMLERR_UNEXPECTEDEOF)); } else { pushParseState(where, state); |