summaryrefslogtreecommitdiffstats
path: root/src/corelib/xml
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-12-16 17:30:52 +0100
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-12-17 18:11:03 +0100
commit86246bfe354aaf03065cd78d7d5410e5097ada48 (patch)
tree051ca8ed2534facab55f7e2d2663532564adca1d /src/corelib/xml
parent558fe9383ba0aecbec09cc411c0ebab132aac137 (diff)
remove some code duplication
writeEscaped() can simply call write() once it's done escaping Reviewed-by: denis
Diffstat (limited to 'src/corelib/xml')
-rw-r--r--src/corelib/xml/qxmlstream.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/corelib/xml/qxmlstream.cpp b/src/corelib/xml/qxmlstream.cpp
index 50703a474d..b29bd92ec8 100644
--- a/src/corelib/xml/qxmlstream.cpp
+++ b/src/corelib/xml/qxmlstream.cpp
@@ -3070,17 +3070,7 @@ void QXmlStreamWriterPrivate::writeEscaped(const QString &s, bool escapeWhitespa
escaped += QChar(c);
}
}
- if (device) {
-#ifdef QT_NO_TEXTCODEC
- device->write(escaped.toLatin1(), escaped.size());
-#else
- device->write(encoder->fromUnicode(escaped));
-#endif
- }
- else if (stringDevice)
- stringDevice->append(escaped);
- else
- qWarning("QXmlStreamWriter: No device");
+ write(escaped);
}
// ASCII only!