rgheck schreef:
Vincent van Ravesteijn wrote:
rgheck schreef:
rgheck wrote:
Then again, if there were some other way to avoid the refresh()
call, that would also solve this problem, since then we can let Qt
cache for us. But I don't see one.
Well, the attached might do it, so far as refresh() is concerned,
since it was non-existence that caused the problem. But, as Vincent
said, we can't really be sure when Qt will want to access the file
system and when it won't, so maybe the other solution is still better.
rh
If a file does not exist, caching is turned off (see the constructor
of FileName::private), so then there is no need to refresh (in
theory). Then this is equal to removing the refresh calls after all.
Moreover, the following "FileName const
lhs(os::internal_path(l.absFilename()));" already creates a new
FileName object, and thus already creates a new QFileInfo object and
thus already contains the 'fresh' information. Refreshing lhs and rhs
has no benefit at all since Peter added these two lines.
So removing the refresh calls shouldn't hurt? And didn't that solve
the problem for you? Or did you have to do something else, too?
rh
No, Yes I had to remove the "FileName const
lhs(os::internal_path(l.absFilename()));" calls too.. but these
shouldn't be necessary for a filenames made with
filetools::makeAbsPath(), so when are these necessary ?
Vincent