Details
-
Suggestion
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.9.4
-
None
-
Qt 5.9.4 on ubuntu xenial.
Description
Using QFileSystemWatcher to monitor linux FS "/media" directory in order to detect USB Flash drive insertions and removals. Have noticed that on drive insertion, QDir/QFile queries regarding the newly mounted volume contents are unreliable when made from a slot directly connected to the directoryChanged() signal, but will perform correctly a short while later (100mS delay seems to fix things for me).
Is there some way that QFileSystemWatcher could be enhanced so that it's notifications were deferred until underlying cataloguing of the monitored directory tree was up-to-date, rather than everyone in userland having to debug and then work around this issue.
Maybe even just a warning in the documentation?