summaryrefslogtreecommitdiffstats
path: root/src/xml
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2018-02-16 08:07:08 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2018-02-16 22:31:50 +0000
commit048d8dee52545a9b0a548b4c56958a75a99d9aee (patch)
treec549685860a49e71809e06e90cc0fa6031a2def1 /src/xml
parent6ffb358822db2e0d30fb34853c3222cd866d57c5 (diff)
parent942ab490724fcc9544e786e5783718e1a07aa50b (diff)
Merge "Merge remote-tracking branch 'origin/5.11' into dev" into refs/staging/dev
Diffstat (limited to 'src/xml')
-rw-r--r--src/xml/doc/src/qtxml-index.qdoc11
-rw-r--r--src/xml/sax/qxml.cpp14
-rw-r--r--src/xml/xml.pro2
3 files changed, 13 insertions, 14 deletions
diff --git a/src/xml/doc/src/qtxml-index.qdoc b/src/xml/doc/src/qtxml-index.qdoc
index eb35903756..91f2515d60 100644
--- a/src/xml/doc/src/qtxml-index.qdoc
+++ b/src/xml/doc/src/qtxml-index.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2018 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
@@ -45,4 +45,13 @@
The \l{Qt XML C++ Classes} page gives an overview over the available classes
in this module.
+
+ \section1 Licenses
+
+ The Qt XML module is available under commercial licenses from \l{The Qt Company}.
+ In addition, it is available under free software licenses. Since Qt 5.4,
+ these free software licenses are
+ \l{GNU Lesser General Public License, version 3}, or
+ the \l{GNU General Public License, version 2}.
+ See \l{Qt Licensing} for further details.
*/
diff --git a/src/xml/sax/qxml.cpp b/src/xml/sax/qxml.cpp
index b781176e13..168e8c3cb4 100644
--- a/src/xml/sax/qxml.cpp
+++ b/src/xml/sax/qxml.cpp
@@ -1270,18 +1270,8 @@ void QXmlInputSource::fetchData()
} else if (device->isOpen() || device->open(QIODevice::ReadOnly)) {
rawData.resize(BufferSize);
qint64 size = device->read(rawData.data(), BufferSize);
-
- if (size != -1) {
- // We don't want to give fromRawData() less than four bytes if we can avoid it.
- while (size < 4) {
- if (!device->waitForReadyRead(-1))
- break;
- int ret = device->read(rawData.data() + size, BufferSize - size);
- if (ret <= 0)
- break;
- size += ret;
- }
- }
+ if (size == 0 && device->waitForReadyRead(-1))
+ size = device->read(rawData.data(), BufferSize);
rawData.resize(qMax(qint64(0), size));
}
diff --git a/src/xml/xml.pro b/src/xml/xml.pro
index cf9feda9bc..31d742d6ea 100644
--- a/src/xml/xml.pro
+++ b/src/xml/xml.pro
@@ -3,7 +3,7 @@ QT = core-private
DEFINES += QT_NO_USING_NAMESPACE QT_NO_FOREACH
-win32-msvc*|win32-icc:QMAKE_LFLAGS += /BASE:0x61000000
+msvc:equals(QT_ARCH, i386): QMAKE_LFLAGS += /BASE:0x61000000
QMAKE_DOCS = $$PWD/doc/qtxml.qdocconf