Did this change? I remember that there was a problem about the symlinks that we had at one point.

rh

Well, I see now that the documentation of 4.4.3 is the same. Maybe they only changed the implementation.

Anyway, it makes no sense at all to me.. but something changed

I made a very small test program, containing the following lines:

QFileInfo a("C:/Users/Vincent/OpenSource/test/test12.cpp");
QFileInfo b("C:/Users/Vincent/OpenSource/test/test13.cpp");

Now, a==b returns false in Qt4.4.3 and true in Qt4.5.

(attached is the small test file.)

Vincent
In qt 4.4.3, the comparison is made based on absoluteFilePath, while in qt 4.5.0 it is based on canonicalFilePath. CanonicalFilePath however returns "" if the file does not exist. This means that all non-existent files will be equal in qt 4.5.0 according to QFileInfo::operator==().

see qt-source:
src/corelib/io/qfileinfo.cpp : lines 472-473
    QString file1 = canonicalFilePath(),
               file2 = fileinfo.canonicalFilePath();
and
 QString file1 = absoluteFilePath(),
               file2 = fileinfo.absoluteFilePath();


Vincent

Reply via email to