Uploaded image for project: 'Qt Automotive Suite'
  1. Qt Automotive Suite
  2. AUTOSUITE-1067

qml live does not pick up changes when file is changed with Notepad++ (and possibly other editors)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • 5.15
    • 5.12.0
    • QmlLive
    • None
    • Windows

    Description

      To reproduce:

      Open qmllivebench.exe and let it view a file.

      Do changes to the file with Notepad++.

      Result: nothing happens, qmllivebench does not reload

       

      Curiously, it works with Qt Creator:

      Do changes to the same file with Qt Creator.

      Result: qmllivebench reloads as advertised.

       

      I suspect the reason for this behavior difference is that Notepad++ only updates the modified timestamp (and not the Created or Accessed timestamp - this is IMO the expected behavior), whereas Qt Creator updates all of them (not expected). Since QML live is only watching directories and not files, then updating the Created timestamp will probably trigger a "new entry" in the directory, and it will cause a directory notification.

      I think the bug is in QML Live. It is only watching directories. This does not always pick up changes to the content of a file (since that's not part of the directory this makes sense).

      Here you can see the timestamps produced by Notepad++ vs Qt Creator:

      Saved with Notepad++ :

       

      E:\dev\projects\qtdemonrender\test1> ls .\main.qml | format-list -Property Name,CreationTime, LastAccessTime, LastWriteTime
      Name           : main.qml
      CreationTime   : 29.05.2019 16:46:07
      LastAccessTime : 29.05.2019 16:46:07
      LastWriteTime  : 04.06.2019 11:44:25
      

      Saved with Qt Creator:

      E:\dev\projects\qtdemonrender\test1> ls .\main.qml | format-list -Property Name,CreationTime, LastAccessTime, LastWriteTime
      Name           : main.qml
      CreationTime   : 04.06.2019 11:45:41
      LastAccessTime : 04.06.2019 11:45:41
      LastWriteTime  : 04.06.2019 11:45:41
      

       

      Attachments

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

        Activity

          People

            sabramenkova Svetlana Abramenkova
            smd Jan Arve
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes