[texworks] external read-access causes TeXWorks to revert open file to old version
Stefan Löffler
st.loeffler at gmail.com
Thu Oct 28 20:17:59 CEST 2010
Hi,
Am 2010-10-27 01:15, schrieb Paul A Norman:
> At least with QFileInfo caching is involved Qt 4.3 and up is this
> affecting it?...
>
> "To speed up performance, QFileInfo caches information about the file.
> Because files can be changed by other users or programs, or even by
> other parts of the same program, there is a function that refreshes
> the file information: refresh(). If you want to switch off a
> QFileInfo's caching and force it to access the file system every time
> you request information from it call setCaching(false)."
>
> http://doc.trolltech.com/4.3/qfileinfo.html
Hm, interesting, I didn't remember that. QFileInfo is indeed used to
determine if a file has really been modified. This doesn't explain why
Tw picks up the wrong file content (QFileInfo is only used for metadata
such as the modification timestamp). But it can still play an important
role. We recreate the QFileInfo object for each use, however, so I
wonder if the data is cached just during the lifetime of the object o
throughout, e.g., the lifetime of the application. This will need testing...
Cheers,
Stefan
More information about the texworks
mailing list