diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-02-13 11:58:07 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-02-14 14:24:57 +0100 |
commit | e65cd6f3794e12e6bc5c2ee985eae8e70ff5f333 (patch) | |
tree | 8965835c375422d63b2ccfa927b31a56e64bda1d /src/corelib/xml | |
parent | d1ee7189553e13337b198fe4ba66d79fb7a7f41d (diff) | |
parent | e95a758236cf2c68e33da4ddb62bff4fe8d9dd8b (diff) |
Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
src/concurrent/doc/qtconcurrent.qdocconf
src/corelib/doc/qtcore.qdocconf
src/corelib/global/qglobal.h
src/dbus/doc/qtdbus.qdocconf
src/dbus/qdbusmessage.h
src/gui/doc/qtgui.qdocconf
src/gui/image/qimagereader.cpp
src/network/doc/qtnetwork.qdocconf
src/opengl/doc/qtopengl.qdocconf
src/opengl/qgl.h
src/plugins/platforms/windows/qwindowswindow.cpp
src/printsupport/doc/qtprintsupport.qdocconf
src/sql/doc/qtsql.qdocconf
src/testlib/doc/qttestlib.qdocconf
src/tools/qdoc/doc/config/qt-cpp-ignore.qdocconf
src/widgets/doc/qtwidgets.qdocconf
src/xml/doc/qtxml.qdocconf
Change-Id: Ie9a1fa2cc44bec22a0b942e817a1095ca3414629
Diffstat (limited to 'src/corelib/xml')
-rw-r--r-- | src/corelib/xml/qxmlstream.cpp | 16 | ||||
-rw-r--r-- | src/corelib/xml/qxmlstream.g | 58 | ||||
-rw-r--r-- | src/corelib/xml/qxmlstream_p.h | 58 |
3 files changed, 66 insertions, 66 deletions
diff --git a/src/corelib/xml/qxmlstream.cpp b/src/corelib/xml/qxmlstream.cpp index 455df4ec73..4be4593e95 100644 --- a/src/corelib/xml/qxmlstream.cpp +++ b/src/corelib/xml/qxmlstream.cpp @@ -1958,7 +1958,7 @@ QStringRef QXmlStreamReader::text() const } -/*! If the state() is \l DTD, this function returns the DTD's +/*! If the tokenType() is \l DTD, this function returns the DTD's notation declarations. Otherwise an empty vector is returned. The QXmlStreamNotationDeclarations class is defined to be a QVector @@ -1973,7 +1973,7 @@ QXmlStreamNotationDeclarations QXmlStreamReader::notationDeclarations() const } -/*! If the state() is \l DTD, this function returns the DTD's +/*! If the tokenType() is \l DTD, this function returns the DTD's unparsed (external) entity declarations. Otherwise an empty vector is returned. The QXmlStreamEntityDeclarations class is defined to be a QVector @@ -1990,7 +1990,7 @@ QXmlStreamEntityDeclarations QXmlStreamReader::entityDeclarations() const /*! \since 4.4 - If the state() is \l DTD, this function returns the DTD's + If the tokenType() is \l DTD, this function returns the DTD's name. Otherwise an empty string is returned. */ @@ -2005,7 +2005,7 @@ QStringRef QXmlStreamReader::dtdName() const /*! \since 4.4 - If the state() is \l DTD, this function returns the DTD's + If the tokenType() is \l DTD, this function returns the DTD's public identifier. Otherwise an empty string is returned. */ @@ -2020,7 +2020,7 @@ QStringRef QXmlStreamReader::dtdPublicId() const /*! \since 4.4 - If the state() is \l DTD, this function returns the DTD's + If the tokenType() is \l DTD, this function returns the DTD's system identifier. Otherwise an empty string is returned. */ @@ -2032,7 +2032,7 @@ QStringRef QXmlStreamReader::dtdSystemId() const return QStringRef(); } -/*! If the state() is \l StartElement, this function returns the +/*! If the tokenType() is \l StartElement, this function returns the element's namespace declarations. Otherwise an empty vector is returned. @@ -2845,7 +2845,7 @@ bool QXmlStreamReader::isStandaloneDocument() const /*! \since 4.4 - If the state() is \l StartDocument, this function returns the + If the tokenType() is \l StartDocument, this function returns the version string as specified in the XML declaration. Otherwise an empty string is returned. */ @@ -2860,7 +2860,7 @@ QStringRef QXmlStreamReader::documentVersion() const /*! \since 4.4 - If the state() is \l StartDocument, this function returns the + If the tokenType() is \l StartDocument, this function returns the encoding string as specified in the XML declaration. Otherwise an empty string is returned. */ diff --git a/src/corelib/xml/qxmlstream.g b/src/corelib/xml/qxmlstream.g index dc0bb353c9..cd7b4fe14e 100644 --- a/src/corelib/xml/qxmlstream.g +++ b/src/corelib/xml/qxmlstream.g @@ -207,18 +207,18 @@ public: inline QStringRef addToStringStorage(const QStringRef &s) { int pos = tagStackStringStorageSize; - int sz = s.size(); - if (pos != tagStackStringStorage.size()) - tagStackStringStorage.resize(pos); + int sz = s.size(); + if (pos != tagStackStringStorage.size()) + tagStackStringStorage.resize(pos); tagStackStringStorage.insert(pos, s.unicode(), sz); tagStackStringStorageSize += sz; return QStringRef(&tagStackStringStorage, pos, sz); } inline QStringRef addToStringStorage(const QString &s) { int pos = tagStackStringStorageSize; - int sz = s.size(); - if (pos != tagStackStringStorage.size()) - tagStackStringStorage.resize(pos); + int sz = s.size(); + if (pos != tagStackStringStorage.size()) + tagStackStringStorage.resize(pos); tagStackStringStorage.insert(pos, s.unicode(), sz); tagStackStringStorageSize += sz; return QStringRef(&tagStackStringStorage, pos, sz); @@ -525,7 +525,7 @@ bool QXmlStreamReaderPrivate::parse() case QXmlStreamReader::StartElement: name.clear(); prefix.clear(); - qualifiedName.clear(); + qualifiedName.clear(); namespaceUri.clear(); if (publicNamespaceDeclarations.size()) publicNamespaceDeclarations.clear(); @@ -536,7 +536,7 @@ bool QXmlStreamReaderPrivate::parse() Tag &tag = tagStack_pop(); namespaceUri = tag.namespaceDeclaration.namespaceUri; name = tag.name; - qualifiedName = tag.qualifiedName; + qualifiedName = tag.qualifiedName; isEmptyElement = false; return true; } @@ -545,7 +545,7 @@ bool QXmlStreamReaderPrivate::parse() case QXmlStreamReader::EndElement: name.clear(); prefix.clear(); - qualifiedName.clear(); + qualifiedName.clear(); namespaceUri.clear(); clearTextBuffer(); break; @@ -559,7 +559,7 @@ bool QXmlStreamReaderPrivate::parse() case QXmlStreamReader::Comment: case QXmlStreamReader::Characters: isCDATA = false; - isWhitespace = true; + isWhitespace = true; text.clear(); clearTextBuffer(); break; @@ -571,21 +571,21 @@ bool QXmlStreamReaderPrivate::parse() case QXmlStreamReader::ProcessingInstruction: processingInstructionTarget.clear(); processingInstructionData.clear(); - clearTextBuffer(); + clearTextBuffer(); break; case QXmlStreamReader::NoToken: case QXmlStreamReader::Invalid: break; case QXmlStreamReader::StartDocument: - lockEncoding = true; + lockEncoding = true; documentVersion.clear(); documentEncoding.clear(); #ifndef QT_NO_TEXTCODEC - if(decoder->hasFailure()) { - raiseWellFormedError(QXmlStream::tr("Encountered incorrectly encoded content.")); - readBuffer.clear(); - return false; - } + if (decoder->hasFailure()) { + raiseWellFormedError(QXmlStream::tr("Encountered incorrectly encoded content.")); + readBuffer.clear(); + return false; + } #endif // fall through default: @@ -1225,7 +1225,7 @@ cdata ::= langle_bang CDATA_START; case $rule_number: { setType(QXmlStreamReader::Characters); isCDATA = true; - isWhitespace = false; + isWhitespace = false; int pos = sym(2).pos; if (scanUntil("]]>", -1)) { text = QStringRef(&textBuffer, pos, textBuffer.size() - pos - 3); @@ -1294,7 +1294,7 @@ scan_content_char ::= SPACE; resume($rule_number); return false; } - break; + break; ./ content_char_list ::= content_char_list char_ref; @@ -1310,11 +1310,11 @@ content_char_list ::= scan_content_char; character_content ::= content_char_list %prec SHIFT_THERE; /. case $rule_number: - if (!textBuffer.isEmpty()) { + if (!textBuffer.isEmpty()) { setType(QXmlStreamReader::Characters); text = &textBuffer; - } - break; + } + break; ./ literal ::= QUOTE QUOTE; @@ -1361,7 +1361,7 @@ literal_content_start ::= LETTER | DIGIT | RANGLE | HASH | LBRACK | RBRACK | LPA literal_content_start ::= SPACE; /. case $rule_number: - if (normalizeLiterals) + if (normalizeLiterals) textBuffer.data()[textBuffer.size()-1] = QLatin1Char(' '); break; ./ @@ -1405,7 +1405,7 @@ entity_value ::= QUOTE entity_value_content_with_dblquote QUOTE; entity_value ::= DBLQUOTE entity_value_content_with_quote DBLQUOTE; /. case $rule_number: - sym(1) = sym(2); + sym(1) = sym(2); break; ./ @@ -1609,7 +1609,7 @@ unresolved_entity ::= UNRESOLVED_ENTITY; } setType(QXmlStreamReader::EntityReference); name = &unresolvedEntity; - break; + break; ./ entity_ref ::= AMPERSAND name SEMICOLON; @@ -1646,10 +1646,10 @@ entity_ref ::= AMPERSAND name SEMICOLON; } } - injectToken(UNRESOLVED_ENTITY); - unresolvedEntity = symString(2).toString(); - textBuffer.chop(2 + sym(2).len); - clearSym(); + injectToken(UNRESOLVED_ENTITY); + unresolvedEntity = symString(2).toString(); + textBuffer.chop(2 + sym(2).len); + clearSym(); } break; ./ diff --git a/src/corelib/xml/qxmlstream_p.h b/src/corelib/xml/qxmlstream_p.h index 8276fe2721..68b7ff7af3 100644 --- a/src/corelib/xml/qxmlstream_p.h +++ b/src/corelib/xml/qxmlstream_p.h @@ -701,18 +701,18 @@ public: inline QStringRef addToStringStorage(const QStringRef &s) { int pos = tagStackStringStorageSize; - int sz = s.size(); - if (pos != tagStackStringStorage.size()) - tagStackStringStorage.resize(pos); + int sz = s.size(); + if (pos != tagStackStringStorage.size()) + tagStackStringStorage.resize(pos); tagStackStringStorage.insert(pos, s.unicode(), sz); tagStackStringStorageSize += sz; return QStringRef(&tagStackStringStorage, pos, sz); } inline QStringRef addToStringStorage(const QString &s) { int pos = tagStackStringStorageSize; - int sz = s.size(); - if (pos != tagStackStringStorage.size()) - tagStackStringStorage.resize(pos); + int sz = s.size(); + if (pos != tagStackStringStorage.size()) + tagStackStringStorage.resize(pos); tagStackStringStorage.insert(pos, s.unicode(), sz); tagStackStringStorageSize += sz; return QStringRef(&tagStackStringStorage, pos, sz); @@ -1019,7 +1019,7 @@ bool QXmlStreamReaderPrivate::parse() case QXmlStreamReader::StartElement: name.clear(); prefix.clear(); - qualifiedName.clear(); + qualifiedName.clear(); namespaceUri.clear(); if (publicNamespaceDeclarations.size()) publicNamespaceDeclarations.clear(); @@ -1030,7 +1030,7 @@ bool QXmlStreamReaderPrivate::parse() Tag &tag = tagStack_pop(); namespaceUri = tag.namespaceDeclaration.namespaceUri; name = tag.name; - qualifiedName = tag.qualifiedName; + qualifiedName = tag.qualifiedName; isEmptyElement = false; return true; } @@ -1039,7 +1039,7 @@ bool QXmlStreamReaderPrivate::parse() case QXmlStreamReader::EndElement: name.clear(); prefix.clear(); - qualifiedName.clear(); + qualifiedName.clear(); namespaceUri.clear(); clearTextBuffer(); break; @@ -1053,7 +1053,7 @@ bool QXmlStreamReaderPrivate::parse() case QXmlStreamReader::Comment: case QXmlStreamReader::Characters: isCDATA = false; - isWhitespace = true; + isWhitespace = true; text.clear(); clearTextBuffer(); break; @@ -1065,21 +1065,21 @@ bool QXmlStreamReaderPrivate::parse() case QXmlStreamReader::ProcessingInstruction: processingInstructionTarget.clear(); processingInstructionData.clear(); - clearTextBuffer(); + clearTextBuffer(); break; case QXmlStreamReader::NoToken: case QXmlStreamReader::Invalid: break; case QXmlStreamReader::StartDocument: - lockEncoding = true; + lockEncoding = true; documentVersion.clear(); documentEncoding.clear(); #ifndef QT_NO_TEXTCODEC - if(decoder->hasFailure()) { - raiseWellFormedError(QXmlStream::tr("Encountered incorrectly encoded content.")); - readBuffer.clear(); - return false; - } + if (decoder->hasFailure()) { + raiseWellFormedError(QXmlStream::tr("Encountered incorrectly encoded content.")); + readBuffer.clear(); + return false; + } #endif // fall through default: @@ -1550,7 +1550,7 @@ bool QXmlStreamReaderPrivate::parse() case 101: { setType(QXmlStreamReader::Characters); isCDATA = true; - isWhitespace = false; + isWhitespace = false; int pos = sym(2).pos; if (scanUntil("]]>", -1)) { text = QStringRef(&textBuffer, pos, textBuffer.size() - pos - 3); @@ -1597,14 +1597,14 @@ bool QXmlStreamReaderPrivate::parse() resume(130); return false; } - break; + break; case 139: - if (!textBuffer.isEmpty()) { + if (!textBuffer.isEmpty()) { setType(QXmlStreamReader::Characters); text = &textBuffer; - } - break; + } + break; case 140: case 141: @@ -1624,7 +1624,7 @@ bool QXmlStreamReaderPrivate::parse() break; case 173: - if (normalizeLiterals) + if (normalizeLiterals) textBuffer.data()[textBuffer.size()-1] = QLatin1Char(' '); break; @@ -1651,7 +1651,7 @@ bool QXmlStreamReaderPrivate::parse() case 178: case 179: - sym(1) = sym(2); + sym(1) = sym(2); break; case 180: @@ -1789,7 +1789,7 @@ bool QXmlStreamReaderPrivate::parse() } setType(QXmlStreamReader::EntityReference); name = &unresolvedEntity; - break; + break; case 240: { sym(1).len += sym(2).len + 1; @@ -1823,10 +1823,10 @@ bool QXmlStreamReaderPrivate::parse() } } - injectToken(UNRESOLVED_ENTITY); - unresolvedEntity = symString(2).toString(); - textBuffer.chop(2 + sym(2).len); - clearSym(); + injectToken(UNRESOLVED_ENTITY); + unresolvedEntity = symString(2).toString(); + textBuffer.chop(2 + sym(2).len); + clearSym(); } break; |