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: