Removed size comparison in QFileInfo::operator==.
authorMitch Curtis <mitch.curtis@nokia.com>
Tue, 22 May 2012 14:08:08 +0000 (16:08 +0200)
committerQt by Nokia <qt-info@nokia.com>
Wed, 23 May 2012 12:18:34 +0000 (14:18 +0200)
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>
src/corelib/io/qfileinfo.cpp

index 1dcde04..e533511 100644 (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;
 }