[Psi-devel] Bug-Report: Psi 0.10 stats every file in my home
Georg Sauthoff
g_sauthoff at web.de
Sat Mar 31 11:30:24 PDT 2007
On 2007-03-31, textshell-I1QKlO at neutronstar.dyndns.org <textshell-I1QKlO at neutronstar.dyndns.org> wrote:
> And i don't see a stat in that code for every file, does qt do that
> automaticly?
This two lines seem to be reponsible for the stat()s:
- QDir d(*it);
- QStringList entries = d.entryList();
Didn't look at the qt code, but I guess that QDir does stat() by
default, just in case it is needed for the filter spec of QDir.
If this is true, then of course a Qt-Bug-Report would be appropriate:
'QDir stats every dir entry if filterSpec == QDir::All'
Btw, instead of the
- if(*it2 == "." || *it2 == "..")
- continue;
construct, you could just set the QDir filter spec to QDir::Files as
constructor parameter.
And of course
- if(str.left(4) != "psi_")
- continue;
could be replaced by setting the nameFilter to "psi_*" (again as
constructor parameter).
Best regards
Georg Sauthoff
More information about the psi-devel
mailing list