Removed size comparison in QFileInfo::operator==.

QTBUG-4031 and QTBUG-4036 mention that QFileInfo::operator==
includes a size() comparison as part of its equality check. I've
removed this check as it doesn't seem to be integral to the comparison.

Task-number: QTBUG-4031
Task-number: QTBUG-4036
Change-Id: I5663ec0e1ac8f70e0a156357c284696779ecd380
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Mitch Curtis 2012-05-22 16:08:08 +02:00 committed by Qt by Nokia
parent d74a246cc9
commit 318d39ccaf

View File

@ -415,9 +415,6 @@ bool QFileInfo::operator==(const QFileInfo &fileinfo) const
sensitive = d->fileEngine->caseSensitive() ? Qt::CaseSensitive : Qt::CaseInsensitive;
}
if (fileinfo.size() != size()) //if the size isn't the same...
return false;
// Fallback to expensive canonical path computation
return canonicalFilePath().compare(fileinfo.canonicalFilePath(), sensitive) == 0;
}