--- a/src/corelib/xml/qxmlstream.cpp Tue Jul 06 15:10:48 2010 +0300
+++ b/src/corelib/xml/qxmlstream.cpp Wed Aug 18 10:37:55 2010 +0300
@@ -560,7 +560,7 @@
chunk of XML can be added with addData(), if the XML is being read
from a QByteArray, or by waiting for more data to arrive if the
XML is being read from a QIODevice. Either way, atEnd() will
- return false once more adata is available.
+ return false once more data is available.
\sa hasError(), error(), device(), QIODevice::atEnd()
*/
@@ -3716,7 +3716,8 @@
{
Q_D(QXmlStreamWriter);
Q_ASSERT(!data.contains(QLatin1String("?>")));
- d->finishStartElement();
+ if (!d->finishStartElement(false) && d->autoFormatting)
+ d->indent(d->tagStack.size());
d->write("<?");
d->write(target);
if (!data.isNull()) {