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

QFileSystemModel doesn't update the list of drives/storage devices in Windows

    XMLWordPrintable

Details

    • 8e79806d08ab77aa0f87b69a2ef65789216f41c0 (qtbase/dev, 27.10.2016, 5.9)

    Description

      Our team is developing testing tools for Harmattan. We have an application running on Linux and Windows and use QFileSystemModel to get a list of connected mass storage devices. On Linux we use the root path "/media" and on Windows the root path is an empty string to get a list of all drives and storage devices. This works for the most part but on Windows the used model does not update when new storage devices are connected/disconnected. Maybe QFileSystemMonitor is unable to monitor changes in the list of storage devices?

      We're using Qt 4.7.0 (qt-sdk-win-opensource-2010.05)
      Following workaround helps:
      Calling "setRootPath" twice, one for another path (doesn't really matter which one but should be different from the cuurent one), and immediate after that set again its root path with the method "setRootPath" to desire one.

      Attachments

        Issue Links

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

          Activity

            People

              owolff Oliver Wolff
              raimo.gratseff Raimo Gratseff (Inactive)
              Votes:
              2 Vote for this issue
              Watchers:
              19 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: