Jean-Marc Lasgouttes schreef:
Vincent van Ravesteijn wrote:
And a second disadvantage of the QFileInfo class is that it is very
unclear when it accesses the filesystem and how you can avoid that in
cases you don't need to.
It's a bit difficult to see how it can be cleaned up. There is a code
that depends on the Qt version, the OS, the purpose,
absolute/relative etc.
You mean that it does exactly the opposite of what iot was supposed to
do? Funny.
JMarc
Well, the second point is probably my ignorance.
But the following is a sin:
Private(string const & abs_filename) : fi(toqstr(abs_filename))
{
fi.setCaching(fi.exists() ? true : false);
}
Especially when we create and pass FileName's like it is a simple type,
and every time the light of my harddisk will flash.
Vincent