summaryrefslogtreecommitdiffstats
path: root/src/corelib/xml/qxmlstream_p.h
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-02-13 11:58:07 +0100
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2013-02-14 14:24:57 +0100
commite65cd6f3794e12e6bc5c2ee985eae8e70ff5f333 (patch)
tree8965835c375422d63b2ccfa927b31a56e64bda1d /src/corelib/xml/qxmlstream_p.h
parentd1ee7189553e13337b198fe4ba66d79fb7a7f41d (diff)
parente95a758236cf2c68e33da4ddb62bff4fe8d9dd8b (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/qxmlstream_p.h')
-rw-r--r--src/corelib/xml/qxmlstream_p.h58
1 files changed, 29 insertions, 29 deletions
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;