Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.4.1
-
None
-
Windows
Mac OS X
Description
In my application (image browser/viewer for Windows and OS X) I create permanent 'Folders' panel with folders view to easy assess to different folder by user.
I tried to use QFileSystem model (+QTreeView) and was forced to go to (deprecated) QDirModel because QFileSystemModel is not suited for 'live' (changing) filesystem. QFileSystemModel agressively caches all folders and there is no way to flush part of this cache, only delete and re-create the model.
There is two ways for fixing it:
a) implement refresh() call, like QDirModel::refresh(), to flush part of cached folders tree. In this case, it is possible update model data by external filesystem change monitoring.
or
b) implement internal monitoring for changing filesystem:
- directory change watcher for every cached node, not single watcher for root path, this is not enough
- (Windows) drive letter added/removed monitoring
- media change monitoring (most annoying under windows, because it needs polling, no callbacks from system)