[Qt-interest] QFileInfo doesn't work after QDir::setCurrent. Bug?

Gabriel M. Beddingfield gabrbedd at gmail.com
Thu Jun 10 21:05:26 CEST 2010



On Thu, 10 Jun 2010, Scott Aron Bloom wrote:

> Performance Issues
> Some of QFileInfo's functions query the file system, but for performance
> reasons, some functions only operate on the file name itself. For
> example: To return the absolute path of a relative file name,
> absolutePath() has to query the file system. The path() function,
> however, can work on the file name directly, and so it is faster.

Got it.  But it doesn't make sense that /sometimes/ a 
relative path is relative, and /sometimes/ it's absolute.

That is, the path is relative until you call a method... and 
then the path gets bound to an absolute path.

That just doesn't make sense.  It should either always be 
relative, or always be absolute.

-gabriel



More information about the Qt-interest-old mailing list