Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.5.0
-
None
-
I5663ec0e1ac8f70e0a156357c284696779ecd380 I9b34f189f1628f9362b3604445706abd2342fd6e
Description
QFileInfo::operator== states: Returns true if this QFileInfo object refers to a file in the same location as fileinfo; otherwise returns false.
But this is only one aspect of comparison, as the size of the file is also compared, not just the location.
If you create QFileInfo of two non-existing files (so completely
different filePathes, in my example it was an empty path and a none
existing file).
The operator== will return true
... I think this behavior was introduced in qt4.5 (or at least I thought
it worked correctly with qt4.4, I haven't spent time trying this again
with the old qt)