On Thu, Dec 13, 2007 at 08:08:35AM +0100, Abdelrazak Younes wrote: > Enrico Forestieri wrote: > > Create a new lyx file and insert an image. Any format will do, except > > eps. Now try View->DVI. You will be informed that your format could > > not be converted to eps and are suggested to define a proper converter. > > However, after clicking OK, the dvi previewer is launched and you > > can see your figure there, which indeed was perfectly converted to eps. > > > > What happens here is that Qt caches file information, such that if > > a FileName is constructed when the file doesn't still exist, Qt still > > thinks it doesn't exist even when the file is later produced by the > > converter. > > > > I think this is done for performance reasons and propose the attached > > patch. Note that Qt also provides a refresh() method that could be used > > after performing an operation that may change the file status, but I > > think that this would be too error prone. Then, maybe it would be > > better to always disable caching, even for already existing files, > > but I am not sure. > > I think this results from our current mix between external support > helpers and FileName' methods. Once we port everything to FileName API > (icluding file copying and directory creation), the problem will vanish.
Nope, that's an intrinsic Qt thingie. > In the mean time maybe we should disable caching indeed. I am not sure it is also useful for files already existing when a FileName is constructed. We have many files in libdir that are not going to change, but I don't know what the actual gain in performance is. -- Enrico