Details
-
Bug
-
Resolution: Done
-
P2: Important
-
6.2.0
-
a4ce85f356b78401fe727a07b908a1e7b5a25198 (qt/qtbase/dev) f7227a7fcabfe17260ccbb6610b1a105844c341f (qt/qtbase/6.2)
Description
QDomDocument::setContent opened the QIODevice by itself, but same does not appear to be true in Qt 6. For example:
QFile file("some.xml");
QDomdocument doc;
doc.setContent(&file);
in Qt 5 all works fine, in Qt 6 it prints a message that the device is not open and naturally the loading fails.
The documentation did not say if it can do that or if it has to be open, so maybe it is not really a bug, but a note could be added here at least:
Attachments
For Gerrit Dashboard: QTBUG-97747 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
379641,9 | QDomDocument::setContent: Open device if necessary | dev | qt/qtbase | Status: MERGED | +2 | 0 |
380580,2 | QDomDocument::setContent: Open device if necessary | 6.2 | qt/qtbase | Status: MERGED | +2 | 0 |