Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-69341

In case of newly mounted volume, QDir/QFile queries unreliable from slot connected to QFileSystemWatcher::directoryChanged signal

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 5.9.4
    • None
    • Qt 5.9.4 on ubuntu xenial.

    • Linux/X11

      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?

       

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            cnn Qt Core & Network
            richardlang Richard Lang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes