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

cannot activate file system watcher in QFileSystemModel

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 6.3.0 Feature Freeze
    • Fix Version/s: None
    • Component/s: Core: Item Models
    • Labels:
      None

      Description

      QFileSystemModel relies on QFileInfoGatherer for file system watching.

      QFileInfoGatherer::setWatching(bool v) can only disable watching, not enable it. There is just no code to do it in this member function:

      void QFileInfoGatherer::setWatching(bool v)
      {
      #if QT_CONFIG(filesystemwatcher)
          QMutexLocker locker(&mutex);
          if (v != m_watching) {
              if (!v) {
                  delete m_watcher;
                  m_watcher = nullptr;
              }
              m_watching = v;
          }
      #else
          Q_UNUSED(v);
      #endif
      }
      

      A unit test showing this problem is linked to this bug.

        Attachments

        For Gerrit Dashboard: QTBUG-99750
        # Subject Branch Project Status CR V

          Activity

            People

            Assignee:
            cnn Qt Core & Network
            Reporter:
            andreasbuhr Andreas Buhr
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There is 1 open Gerrit change