summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Arve Saether <jan-arve.saether@digia.com>2013-02-06 11:06:17 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-06 14:21:44 +0100
commitba2a0d652c3366638fb18218b632de8512fb1c9c (patch)
tree3bf39af712cc8df26a6d78d8d799e632581cd102
parent05ce12849b2e266210b71a432ce65883a1fdbe60 (diff)
Clean up whitespace
Change-Id: I3413e0f55df07a35ad2e93da9bae2ca7f9b8d4c1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
-rw-r--r--src/corelib/xml/qxmlstream.g58
-rw-r--r--src/corelib/xml/qxmlstream_p.h58
2 files changed, 58 insertions, 58 deletions
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;