Details
-
Bug
-
Resolution: Incomplete
-
Not Evaluated
-
None
-
4.7.4, 4.8.6, 5.5.0
-
None
-
Windows 7 and Qt, nothing else needed
Description
Hi,
on Windows, the widgets/itemviews/dirview example fails to update the root directory of a drive if it is suddenly empty.
Howe to reproduce:
1. Use an USB thumb drive that is empty. Add two random files.
2. Open the dirview example
3. Delete the two files
=> dirview example does not updated, the two files are still shown.
Upon inspecting this problem, the culprit seems to be qfileinfogatherer.cpp that contains code like this:
-------------------
if (!allFiles.isEmpty())
emit newListOfFiles(path, allFiles);
-------------------
WTF? Is it really saying that it's impossible that the directory is empty?
NOTE: qfilesystemmodel only removes the file entries from cache in the slot connected to the signal above.
NOTE: qfilesystemmodel was programmed in the I-always-know-best style and thus cannot be instructed from outside to through away part-of/all-of its cache.