Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.8.x, 5.0.0
-
None
-
d457f148cf1efbea3db5fdc87c418cc9647e2baf (5.0), 425272e7405eed077cb65a101d5dd1fafc4b11d2 (4.8)
Description
/*!
Constructs an input source and gets the data from device \a dev.
If \a dev is not open, it is opened in read-only mode. If \a dev
is 0 or it is not possible to read from the device, the input
source will contain no data.
\sa setData() fetchData() QIODevice
*/
QXmlInputSource::QXmlInputSource(QIODevice *dev)
{
init();
d->inputDevice = dev;
d->inputDevice->setTextModeEnabled(false);
}
Above function does not open the input device before setting text mode.
Needs something like
if (!dev->isOpen())
dev->open(QIODevice::ReadOnly);
Attachments
Issue Links
- resulted from
-
QTBUG-20905 QFile setTextModeEnabled() trashes file information
-
- Closed
-