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