Uploaded image for project: 'Qt Design Studio'
  1. Qt Design Studio
  2. QDS-8820

filewatcher can lead to hanging QtDesignStudio process

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Not Evaluated Not Evaluated
    • QDS 4.0
    • QDS 3.9
    • All Other Issues
    • None
    • 8e69490da (qds/dev)
    • QDS Berlin - 2023 Week 3/4

      The idea is not to use dir.entryInfoList because that results in GetFileAttributesEx inside QFileSystemEngine::fillMetaData (also fileExists would do that).

      #include "filesystemwatcher.h"
      +#include "filepath.h"
       #include "globalfilechangeblocker.h"
      @@ -439,7 +440,7 @@ void FileSystemWatcher::slotDirectoryChanged(const QString &path)
           QStringList toReadd;
      -    const QDir dir(path);
      -    for (const QFileInfo &entry : dir.entryInfoList(QDir::Files)) {
      -        const QString file = entry.filePath();
      +    const auto dir = FilePath::fromString(path);
      +    for (const FilePath &entry : dir.dirEntries(QDir::Files)) {
      +        const QString file = entry.toString();
               if (d->m_files.contains(file))
                   toReadd.append(file);
      

        For Gerrit Dashboard: QDS-8820
        # Subject Branch Project Status CR V

            tjenssen Tim Jenssen
            tjenssen Tim Jenssen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes