diff options
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/io/qdir.cpp | 6 | ||||
-rw-r--r-- | src/corelib/io/qfileinfo.cpp | 1 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp index f9196e0..6e25d91 100644 --- a/src/corelib/io/qdir.cpp +++ b/src/corelib/io/qdir.cpp @@ -1633,9 +1633,9 @@ bool QDir::operator==(const QDir &dir) const if (d->filters == other->filters && d->sort == other->sort && d->nameFilters == other->nameFilters) { - d->resolveAbsoluteEntry(); - other->resolveAbsoluteEntry(); - return d->absoluteDirEntry.filePath().compare(other->absoluteDirEntry.filePath(), sensitive) == 0; + + // Fallback to expensive canonical path computation + return canonicalPath().compare(dir.canonicalPath(), sensitive) == 0; } return false; } diff --git a/src/corelib/io/qfileinfo.cpp b/src/corelib/io/qfileinfo.cpp index ca42c87..6e25206 100644 --- a/src/corelib/io/qfileinfo.cpp +++ b/src/corelib/io/qfileinfo.cpp @@ -406,6 +406,7 @@ bool QFileInfo::operator==(const QFileInfo &fileinfo) const 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; } |