summaryrefslogtreecommitdiffstats
path: root/src/xml
diff options
context:
space:
mode:
Diffstat (limited to 'src/xml')
-rw-r--r--src/xml/sax/qxml.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/xml/sax/qxml.cpp b/src/xml/sax/qxml.cpp
index 2f5384b902..c4c5f0c333 100644
--- a/src/xml/sax/qxml.cpp
+++ b/src/xml/sax/qxml.cpp
@@ -1321,7 +1321,8 @@ QXmlInputSource::QXmlInputSource(QIODevice *dev)
{
init();
d->inputDevice = dev;
- d->inputDevice->setTextModeEnabled(false);
+ if (dev->isOpen())
+ d->inputDevice->setTextModeEnabled(false);
}
#ifdef QT3_SUPPORT
@@ -7748,7 +7749,13 @@ bool QXmlSimpleReaderPrivate::processReference()
return false;
}
if (ret) {
- QString xmlRefString = ret->data();
+ QString xmlRefString;
+ QString buffer = ret->data();
+ while (buffer.length()>0){
+ xmlRefString += buffer;
+ ret->fetchData();
+ buffer = ret->data();
+ }
delete ret;
if (!stripTextDecl(xmlRefString)) {
reportParseError(QLatin1String(XMLERR_ERRORINTEXTDECL));