Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.7.3
-
None
-
Linux 2.6.32, Linux 3.0, glibc 2.11
-
3b093034b638a69b4dc91212d1743638864a1337
Description
See the attached testcase: I get directories and symlinks, but no actual device files.
The QDir::System filter is explicitely passed (whose description, btw, is "List system files (on Unix, FIFOs, sockets and device files are included; on Windows, .lnk files are included)").
I think I tracked this issue down to http://qt.gitorious.org/qt/qt/blobs/master/src/gui/dialogs/qfilesystemmodel.cpp#line1819 . _q_fileSystemChanged is the method called by the gathering thread when new data is available. Line 1849 is the problem:
if (info.size() == -1 && !info.isSymLink()) {
size() is defined here and it returns -1 for all kind of special files: http://qt.gitorious.org/qt/qt/blobs/master/src/gui/dialogs/qfileinfogatherer_p.h#line127
So: device files are not symlinks and report a size of -1, thus they are removed from the model.
Attachments
Issue Links
- relates to
-
QTBUG-21970 QFileDialog doesn't list tty* files in /dev/ on Linux
-
- Closed
-
- resulted in
-
QTBUG-53890 tst_QFileSystemModel::specialFiles() fails on Windows
-
- Closed
-
For Gerrit Dashboard: QTBUG-20968 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
143622,4 | QFileSystemModel: report special files which are not symlinks | 5.6 | qt/qtbase | Status: MERGED | +2 | 0 |
161798,4 | tst_QFileSystemModel::specialFiles(): Remove Windows parts | 5.6 | qt/qtbase | Status: MERGED | +2 | 0 |