Le 11/05/2017 à 07:46, Stephan Witt a écrit :

On the first save LyX asks for a file name because it’s a new file.
This in fact is a Save-As operation. The save succeeds normal.
After that every change+save is accompanied by the message popup.
NB: I’m accepting the file name proposal - so it’s the same file name
before and after the save-as.

Thanks.


Guillaume, it’s the FileMonitor which is detecting the file save as external 
modification.
How can I provide further info to correct this annoying behavior?
My attempt to diagnose the culprit failed - the code is too weird for me :(

I tried to stop in Buffer::Impl::refreshFileMonitor() at the first line.
The debugger didn’t stop - but it stopped in 
Buffer::Impl::fileExternallyModified()
and the call stack claims it comes from the last line in refreshFileMonitor() 
???

As QFileSystemWatcher is intrinsically asynchronous, gdb does not really
help with debugging here. What you see on the trace is
QFileSystemWatcher calling the function that was passed to connect at
the end of refreshFileMonitor (via a qt signal that is converted into a
boost signal).

That makes sense. BTW, what’s the semantic of a void C++ function when
it returns a value (2nd line after the if())? I’m surprised it’s allowed.

I am not surprised that it is allowed (void is a type and here it
type-checks), but indeed this is not how I write usually. This
looks like something that used to return a bool at some point. I'll
correct it.

Guillaume

Reply via email to