summaryrefslogtreecommitdiffstats
path: root/src/xml
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-05-28 08:27:50 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-05-28 08:31:07 (GMT)
commitf390f9b51cf8686e9ed44f13a33c7349b9e96a09 (patch)
tree162c768769713a7215bca64daf8f2bdc75c9fbee /src/xml
parent0bb0699d403b7541472a72a4057ecf0ca366a7cd (diff)
downloadQt-f390f9b51cf8686e9ed44f13a33c7349b9e96a09.zip
Qt-f390f9b51cf8686e9ed44f13a33c7349b9e96a09.tar.gz
Qt-f390f9b51cf8686e9ed44f13a33c7349b9e96a09.tar.bz2
improved string operations all over the place
used character operations whenever possible better usage of QLatin1String
Diffstat (limited to 'src/xml')
-rw-r--r--src/xml/dom/qdom.cpp2
-rw-r--r--src/xml/sax/qxml.cpp12
2 files changed, 7 insertions, 7 deletions
diff --git a/src/xml/dom/qdom.cpp b/src/xml/dom/qdom.cpp
index dc6ff92..da0e31b 100644
--- a/src/xml/dom/qdom.cpp
+++ b/src/xml/dom/qdom.cpp
@@ -4589,7 +4589,7 @@ void QDomElementPrivate::save(QTextStream& s, int depth, int indent) const
qName = prefix + QLatin1Char(':') + name;
nsDecl = QLatin1String(" xmlns:") + prefix;
}
- nsDecl += QLatin1String("=\"") + encodeText(namespaceURI, s) + QLatin1String("\"");
+ nsDecl += QLatin1String("=\"") + encodeText(namespaceURI, s) + QLatin1Char('\"');
}
s << '<' << qName << nsDecl;
diff --git a/src/xml/sax/qxml.cpp b/src/xml/sax/qxml.cpp
index ade0339..db50f01 100644
--- a/src/xml/sax/qxml.cpp
+++ b/src/xml/sax/qxml.cpp
@@ -5464,7 +5464,7 @@ bool QXmlSimpleReaderPrivate::parsePEReference()
if (skipIt) {
if (contentHnd) {
- if (!contentHnd->skippedEntity(QString::fromLatin1("%") + ref())) {
+ if (!contentHnd->skippedEntity(QLatin1Char('%') + ref())) {
reportParseError(contentHnd->errorString());
return false;
}
@@ -5476,7 +5476,7 @@ bool QXmlSimpleReaderPrivate::parsePEReference()
return false;
} else if (parsePEReference_context == InDTD) {
// Included as PE
- if (!insertXmlRef(QString::fromLatin1(" ")+xmlRefString+QString::fromLatin1(" "), ref(), false))
+ if (!insertXmlRef(QLatin1Char(' ') + xmlRefString + QLatin1Char(' '), ref(), false))
return false;
}
}
@@ -6728,7 +6728,7 @@ bool QXmlSimpleReaderPrivate::parseEntityDecl()
if ( !entityExist(name())) {
parameterEntities.insert(name(), string());
if (declHnd) {
- if (!declHnd->internalEntityDecl(QString::fromLatin1("%")+name(), string())) {
+ if (!declHnd->internalEntityDecl(QLatin1Char('%') + name(), string())) {
reportParseError(declHnd->errorString());
return false;
}
@@ -6740,7 +6740,7 @@ bool QXmlSimpleReaderPrivate::parseEntityDecl()
if ( !entityExist(name())) {
externParameterEntities.insert(name(), QXmlSimpleReaderPrivate::ExternParameterEntity(publicId, systemId));
if (declHnd) {
- if (!declHnd->externalEntityDecl(QString::fromLatin1("%")+name(), publicId, systemId)) {
+ if (!declHnd->externalEntityDecl(QLatin1Char('%') + name(), publicId, systemId)) {
reportParseError(declHnd->errorString());
return false;
}
@@ -7864,8 +7864,8 @@ bool QXmlSimpleReaderPrivate::insertXmlRef(const QString &data, const QString &n
{
if (inLiteral) {
QString tmp = data;
- xmlRefStack.push(XmlRef(name, tmp.replace(QLatin1String("\""),
- QLatin1String("&quot;")).replace(QLatin1String("'"), QLatin1String("&apos;"))));
+ xmlRefStack.push(XmlRef(name, tmp.replace(QLatin1Char('\"'),
+ QLatin1String("&quot;")).replace(QLatin1Char('\''), QLatin1String("&apos;"))));
} else {
xmlRefStack.push(XmlRef(name, data));
}