Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
6.6.3
-
None
-
0211dfd92 (dev), cddf6498d (6.7), e409ae4fa (6.6)
Description
Despite the name, QFileInfo can also represent a directory. The behavior of methods like QFileInfo::path() can then be confusing, see e.g. https://forum.qt.io/topic/153585/correctly-create-qdir-from-qfileinfo/10
Suggestion: Make the distinction between (file) object and file in the documentation. This is done already partially. COmpare e.g.
> Returns the path of the object's parent directory as a QDir object.
vs
> Returns the file's path.
Also, make behavior of https://doc.qt.io/qt-6/qfileinfo.html#absoluteDir more explicit, e.g. with a code snippet.