Le 11/03/2017 à 08:34, Pavel Sanda a écrit :
Guillaume Munch wrote:
commit 24f68aff8d2ba9139017ca3927eda1f1aaf039af
Author: Guillaume Munch <g...@lyx.org>
Date:   Sat Mar 11 00:11:02 2017 +0100

    Nonsense for whoever insists on using gcc4.6 & qt4.8 in 2017

Does it mean it is not supposed to work with those two or it should?

With this commit, it works with gcc4.6 and qt4.8, though it required
imaginative workarounds that I hope we can delete at some point. My only
worry is that QFileSystemWatcher has been rewritten in qt5, so it is
possible that it behaves differently with qt4.8.


I just quickly checked that the new monitor does not work on networked fs.
To reproduce: mount via sshfs to another machine and load lyx document
from there. After that change some image which was loaded within
the document. The new monitor machiner does not catch it anymore.

gcc 4.9.4 & qt 4.8.

Thanks for testing. This is a limitation of inotify. For the same reason
you will not be warned if the file is modified externally until you try
to save it. The same happens with gedit. MacOS and Windows use other
backends so it might be different (but at best they will only tell about
modifications made from the same machine).

The previous FileMonitor worked by querying the modification time every
two seconds per graphics, and computing the checksum if the timestamp
changed. This is expensive especially over the network, and there is a
reason why inotify does not do it. On the other hand, for graphics, the
idea of the previous FileMonitor could be adapted to refresh graphics
when they appear on the screen (but stop doing it when they leave the
screen). In that case, I even wonder whether it is useful to use the file monitor for graphics files.

Guillaume

Reply via email to