QFileSystemModelPrivate::name(): avoid the double-lookup
Change-Id: I67507248220fbbddc67ab60ecb1933e1fbacf5fd Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This commit is contained in:
parent
bfb6a8cd44
commit
d2648d5f3f
@ -796,8 +796,7 @@ QString QFileSystemModelPrivate::name(const QModelIndex &index) const
|
||||
#endif
|
||||
!resolvedSymLinks.isEmpty() && dirNode->isSymLink(/* ignoreNtfsSymLinks = */ true)) {
|
||||
QString fullPath = QDir::fromNativeSeparators(filePath(index));
|
||||
if (resolvedSymLinks.contains(fullPath))
|
||||
return resolvedSymLinks.value(fullPath);
|
||||
return resolvedSymLinks.value(fullPath, dirNode->fileName);
|
||||
}
|
||||
return dirNode->fileName;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user