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

QFileSystemWatcher does not monitor a file

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • P2: Important
    • Resolution: Invalid
    • 6.3.0
    • None
    • None
    • Linux/X11

    Description

      Problem described here: https://forum.qt.io/post/716353

      If I edit file in an editor - QFileSystemWatcher triggers `fileChanged()` signal. If I do:

          std::ofstream output_file(file_Name, std::ios_base::out | std::ios_base::trunc);
          output_file << content;
          output_file.flush();
      

      Or analogous with Qt classes (QFile and QTextStream), then QFileSystemWatcher does not work, no signal. QFileSystemWatcher::files() shows files is still being monitored after truncation.

      File system is ext4. Minimal working example: https://forum.qt.io/post/716370 and another one: https://forum.qt.io/post/716365

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            alekseyka Aleksey Kontsevich
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes