summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs/qfilesystemmodel.cpp
diff options
context:
space:
mode:
authorMaks Naumov <maksqwe1@ukr.net>2015-10-20 07:54:36 +0300
committerMaks Naumov <maksqwe1@ukr.net>2015-10-20 06:45:57 +0000
commitd2648d5f3f2c9315813dddfdc11110244f0562b9 (patch)
tree7c65f48102232c120dd37b6632c843262720151e /src/widgets/dialogs/qfilesystemmodel.cpp
parentbfb6a8cd44978874a6e80db2c80532dbaf2ff380 (diff)
QFileSystemModelPrivate::name(): avoid the double-lookup
Change-Id: I67507248220fbbddc67ab60ecb1933e1fbacf5fd Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/widgets/dialogs/qfilesystemmodel.cpp')
-rw-r--r--src/widgets/dialogs/qfilesystemmodel.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/widgets/dialogs/qfilesystemmodel.cpp b/src/widgets/dialogs/qfilesystemmodel.cpp
index 2d8b8fadb1..70df7f305f 100644
--- a/src/widgets/dialogs/qfilesystemmodel.cpp
+++ b/src/widgets/dialogs/qfilesystemmodel.cpp
@@ -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;
}